@nx/docker 23.3.0-beta.2 → 23.3.0-beta.4

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.
@@ -47,15 +47,26 @@ async function createNodesInternal(configFilePath, hash, normalizedOptions, cont
47
47
  };
48
48
  }
49
49
  function interpolateDockerTargetOptions(options, projectRoot, imageRef, context) {
50
- const commitSha = (0, internal_1.getLatestCommitSha)();
50
+ let commitSha;
51
+ const getCommitSha = () => {
52
+ if (commitSha === undefined) {
53
+ commitSha = (0, internal_1.getLatestCommitSha)();
54
+ }
55
+ return commitSha;
56
+ };
51
57
  const projectName = getProjectName(projectRoot, context.workspaceRoot);
52
58
  const tokens = {
53
59
  projectRoot,
54
60
  projectName,
55
61
  imageRef,
56
62
  currentDate: new Date(),
57
- commitSha,
58
- shortCommitSha: commitSha ? commitSha.slice(0, 7) : null,
63
+ get commitSha() {
64
+ return getCommitSha();
65
+ },
66
+ get shortCommitSha() {
67
+ const sha = getCommitSha();
68
+ return sha ? sha.slice(0, 7) : null;
69
+ },
59
70
  };
60
71
  return (0, interpolate_pattern_1.interpolateObject)(options, tokens);
61
72
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nx/docker",
3
3
  "description": "The Nx Plugin for Docker to aid in containerizing projects.",
4
- "version": "23.3.0-beta.2",
4
+ "version": "23.3.0-beta.4",
5
5
  "type": "commonjs",
6
6
  "files": [
7
7
  "dist",
@@ -86,9 +86,9 @@
86
86
  "generators": "./generators.json",
87
87
  "dependencies": {
88
88
  "tslib": "^2.3.0",
89
- "@nx/devkit": "23.3.0-beta.2"
89
+ "@nx/devkit": "23.3.0-beta.4"
90
90
  },
91
91
  "devDependencies": {
92
- "nx": "23.3.0-beta.2"
92
+ "nx": "23.3.0-beta.4"
93
93
  }
94
94
  }