@leverege/build-tools 2.61.6 → 2.61.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.61.6",
3
+ "version": "2.61.7",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -67,7 +67,7 @@
67
67
  "execa": "^9.5.2",
68
68
  "glob": "^11.0.1",
69
69
  "handlebars": "^4.7.8",
70
- "inquirer": "^12.3.3",
70
+ "inquirer": "^12.4.1",
71
71
  "js-yaml": "^4.1.0",
72
72
  "jsdoc": "^4.0.4",
73
73
  "ms": "^2.1.3",
@@ -75,12 +75,12 @@
75
75
  "package-up": "^5.0.0",
76
76
  "parse-gitignore": "^2.0.0",
77
77
  "readline-sync": "^1.4.10",
78
- "semver": "^7.7.0",
78
+ "semver": "^7.7.1",
79
79
  "simple-git": "^3.27.0",
80
- "zx": "^8.3.1"
80
+ "zx": "^8.3.2"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@leverege/eslint-config-leverege": "^5.0.1",
84
- "npm": "^11.0.0"
84
+ "npm": "^11.1.0"
85
85
  }
86
86
  }
package/src/Docker.mjs CHANGED
@@ -74,9 +74,10 @@ const setPreviousBuild = ( version ) => {
74
74
  fs.writeFileSync( previousFile, version )
75
75
  }
76
76
 
77
- const generateDockerfile = ( options ) => {
77
+ const generateDockerfile = async ( options ) => {
78
78
 
79
- const settings = { ...defaultSettings, ...options }
79
+ const gitReference = await shellCmd( 'git rev-parse --short HEAD' )
80
+ const settings = { gitReference, ...defaultSettings, ...options }
80
81
 
81
82
  // defaults to the current "official" version of node unless it gets
82
83
  // overridden in the leverege.nodeimg package.json stanza
@@ -188,10 +189,20 @@ const buildContainerImage = async ( {
188
189
  // TODO: This is janky - I'll clean it up later
189
190
  // NOTE: this is dealing with raw filesystem interactions, meaning there
190
191
  // isn't a shell performing file globbing and what not
192
+ //
193
+ // Steps taken here attempt to minimize impact on legacy build setups
194
+ // 1. rename build dir to workspace
195
+ // 2. create the actual build dir and move workspace into it
196
+ // 3. move the Dockerfile into build and make a copy for image root
197
+ // 4. copy the bashrc file into build and .bashrc on the image root
198
+ // 5. drop a copy of dev's npmrc to use for build process
199
+ // 6. drop a copy of package.json and the lock into the image root
200
+ //
191
201
  fs.renameSync( './build', './workspace' )
192
202
  fs.mkdirSync( './build' )
193
203
  fs.renameSync( './workspace', buildWorkspace )
194
204
  fs.renameSync( './docker/Dockerfile', './build/Dockerfile' )
205
+ fs.cpSync( './build/Dockerfile', `${buildWorkspace}/Dockerfile` )
195
206
  fs.renameSync( './docker/bashrc', './build/bashrc' )
196
207
  fs.cpSync( `${process.env.HOME}/.npmrc`, './build/.npmrc' )
197
208
  fs.cpSync( './package.json', `${buildWorkspace}/package.json` )
@@ -272,7 +272,9 @@ if ( willGitTag ) {
272
272
  }
273
273
  }
274
274
 
275
- await proceed()
275
+ if ( process.env.DRY_RUN !== '1' ) {
276
+ await proceed()
277
+ }
276
278
 
277
279
  if ( isNpmWorkspace ) {
278
280
  log( chalk.yellow.bold( 'Generating an NPM workspace package-lock.json file' ) )
@@ -1,4 +1,4 @@
1
- # Version {{regvers}} @ {{date}}
1
+ # Version {{regvers}} @ {{date}} / Git Ref: {{gitReference}}
2
2
 
3
3
  # The FROM directive sets the Base Image for subsequent instructions
4
4
  FROM {{image}} as intermediate
@@ -1,20 +0,0 @@
1
- registry:
2
- - root: us-docker.pkg.dev
3
- - repositories:
4
- - name: stack
5
- charts:
6
- - api-server
7
- - authz-server
8
- - emailer
9
- - message-processor
10
- - name: leverege
11
- charts:
12
- - pubsub-pulse
13
- - pusher
14
- - overdose
15
- - name: cox-health
16
- charts:
17
- - actions-server
18
- - analytics-server
19
- - centrak-healthz
20
- - centrak-ingestor