@leverege/build-tools 2.8.6 → 2.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -111,7 +111,7 @@ class Gitter {
111
111
  const git = SimpleGit(buildSpec.git.name);
112
112
 
113
113
  try {
114
- await git.init().add(['--all', '--force']); // we want it all!
114
+ await git.init(['--initial-branch', 'development']).add(['--all', '--force']); // we want it all!
115
115
  } catch (initErr) {
116
116
  console.log(initErr);
117
117
  process.exit(1);
@@ -195,7 +195,13 @@ class Gitter {
195
195
 
196
196
  try {
197
197
  spinner.start('Adding all source to the git repository');
198
- await git.add(['--all']).commit(initialCommit).branch(['development']).checkout(['development']);
198
+ await git.add(['--all']).commit(initialCommit); // try {
199
+ // await git.branch( [ 'development' ] )
200
+ // } catch ( brerr ) {
201
+ // console.log( brerr, '***CONTINUING ON' )//XXX
202
+ // }
203
+ // await git.checkout( [ 'development' ] )
204
+
199
205
  spinner.succeed();
200
206
  } catch (err) {
201
207
  console.log(err);
@@ -236,7 +242,7 @@ class Gitter {
236
242
 
237
243
  try {
238
244
  spinner.start(`Pushing ${buildSpec.git.name} repository upstream`);
239
- await git.addRemote('origin', repoHosting.getGitURL('remote', buildSpec)).push(['--set-upstream', 'origin', 'master']).push(['--set-upstream', 'origin', 'development']).checkout(['development']);
245
+ await git.addRemote('origin', repoHosting.getGitURL('remote', buildSpec)).push(['--set-upstream', 'origin', 'development']).branch(['main']).push(['--set-upstream', 'origin', 'main']).checkout(['development']);
240
246
  spinner.succeed();
241
247
  } catch (err) {
242
248
  console.log(err);
@@ -93,7 +93,6 @@ const openAdmin = async buildSpec => {
93
93
  ${chalk.keyword('green')('Project')} - adjust if the original selection was slightly off
94
94
  ${chalk.keyword('green').bold('Description')} - a few words here wouldn't hurt
95
95
  ${chalk.keyword('green').bold('Language')} - set this to Node.js or Javascript?
96
- ${chalk.keyword('green').bold('Main branch')} - set that to ${chalk.keyword('red').bold('development')}, ok?
97
96
  `));
98
97
  await open(getGitURL('admin', buildSpec));
99
98
  await proceed('Please take a moment to at least set the Language and Main branch?');
@@ -13,7 +13,7 @@ const getCurrentBranchName = async () => {
13
13
  };
14
14
 
15
15
  const isProtected = async () => {
16
- const protectedBranches = ['master', 'development', ...process.argv.slice(2)];
16
+ const protectedBranches = ['main', 'master', 'development', ...process.argv.slice(2)];
17
17
  const theBranch = await getCurrentBranchName();
18
18
  return protectedBranches.includes(theBranch);
19
19
  };
@@ -13,7 +13,7 @@ const getCurrentBranchName = async () => {
13
13
  };
14
14
 
15
15
  const isProtected = async () => {
16
- const protectedBranches = ['master', 'development', ...process.argv.slice(2)];
16
+ const protectedBranches = ['main', 'master', 'development', ...process.argv.slice(2)];
17
17
  const theBranch = await getCurrentBranchName();
18
18
  return protectedBranches.includes(theBranch);
19
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.8.6",
3
+ "version": "2.8.8",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -71,7 +71,7 @@
71
71
  "parse-gitignore": "^1.0.1",
72
72
  "readline-sync": "^1.4.10",
73
73
  "semver": "^7.3.5",
74
- "simple-git": "^2.47.0"
74
+ "simple-git": "^2.48.0"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@babel/cli": "^7.16.0",
@@ -79,6 +79,6 @@
79
79
  "@babel/node": "^7.16.0",
80
80
  "@leverege/babel-preset-leverege-node": "^2.0.0",
81
81
  "@leverege/eslint-config-leverege": "^3.0.1",
82
- "npm": "^8.1.3"
82
+ "npm": "^8.2.0"
83
83
  }
84
84
  }
package/src/dockreate CHANGED
@@ -77,7 +77,7 @@ COPY ./.npmrc /usr/src/app/.npmrc
77
77
  RUN apk --no-cache add openssh-client && \
78
78
  apk --update add --no-cache --virtual build-dep g++ gcc libgcc \\
79
79
  libstdc++ linux-headers make ${apkadds} && \
80
- npm install -g npm@7 && \
80
+ npm install -g npm@8 && \
81
81
  npm ci --only-production --ignore-scripts ${npmlogging} && \
82
82
  rm -f /usr/src/app/.npmrc /root/.ssh/*
83
83
 
@@ -90,7 +90,7 @@ FROM node:${nodeimg}
90
90
  # Install tini for PID 1 and replace shell with bash so we can source files
91
91
  RUN apk update && \
92
92
  apk add --no-cache bash curl tini vim ${apkadds} && \
93
- npm install -g npm@7 && \
93
+ npm install -g npm@8 && \
94
94
  rm /bin/sh && ln -s /bin/bash /bin/sh && \
95
95
  mkdir -p /usr/src/app /tmp/levlog && \
96
96
  chown node:node /usr/src/app
package/src/unleash.js CHANGED
@@ -12,7 +12,7 @@ const getCurrentBranchName = async () => {
12
12
  }
13
13
 
14
14
  const isProtected = async () => {
15
- const protectedBranches = [ 'master', 'development', ...process.argv.slice( 2 ) ]
15
+ const protectedBranches = [ 'main', 'master', 'development', ...process.argv.slice( 2 ) ]
16
16
  const theBranch = await getCurrentBranchName()
17
17
  return protectedBranches.includes( theBranch )
18
18
  }