@jakubmazanec/carson-templates 2.2.0 → 2.2.1-next.14317de

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": "@jakubmazanec/carson-templates",
3
- "version": "2.2.0",
3
+ "version": "2.2.1-next.14317de",
4
4
  "description": "Collection of Carson templates.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -3,19 +3,25 @@ to: 'Dockerfile'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let lines = [];
6
+ let installDependenciesLines = ['COPY --link package-lock.json package.json ./'];
7
+
8
+ for (let project of workspace.projects) {
9
+ installDependenciesLines.push(`COPY --link ${project.relativePath}/package.json ${project.relativePath}/package.json`);
10
+ }
11
+
12
+ let copyFilesLines = ['COPY package-lock.json package.json /workspace/'];
7
13
 
8
14
  for (let project of workspace.projects) {
9
15
  if (project.config.deployment?.appName) {
10
- lines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
11
- lines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
16
+ copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
17
+ copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
12
18
  } else {
13
19
  if (project.packageJson.bin) {
14
- lines.push(`COPY --from=build /workspace/${project.relativePath}/bin /workspace/${project.relativePath}/bin`);
20
+ copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/bin /workspace/${project.relativePath}/bin`);
15
21
  }
16
22
 
17
- lines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
18
- lines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
23
+ copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/build /workspace/${project.relativePath}/build`);
24
+ copyFilesLines.push(`COPY --from=build /workspace/${project.relativePath}/package.json /workspace/${project.relativePath}/package.json`);
19
25
  }
20
26
  }
21
27
  -%>
@@ -42,7 +48,7 @@ RUN apt-get update -qq && \
42
48
  apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
43
49
 
44
50
  # Install dependencies
45
- COPY --link package-lock.json package.json ./
51
+ <%- installDependenciesLines.join('\n') %>
46
52
  RUN npm ci --include=dev --ignore-scripts
47
53
 
48
54
  # Copy the workspace
@@ -55,8 +61,7 @@ RUN npm run build
55
61
  FROM base
56
62
 
57
63
  # Copy files
58
- COPY package-lock.json package.json /workspace/
59
- <%- lines.join('\n') %>
64
+ <%- copyFilesLines.join('\n') %>
60
65
 
61
66
  # Install dependencies
62
67
  RUN npm ci --omit=dev --ignore-scripts
@@ -115,6 +115,12 @@ jobs:
115
115
  git status
116
116
  git commit --amend --no-edit
117
117
 
118
+ - name: Update Carson
119
+ run: |
120
+ git add **/.carson/*.snapshot
121
+ git status
122
+ git commit --amend --no-edit
123
+
118
124
  - name: Add git tags
119
125
  run: |
120
126
  npx changeset tag