@verdnatura/myt 2.0.1 → 2.0.2
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/README.md +1 -1
- package/docker/server/Dockerfile.myt +1 -4
- package/myt-build.js +7 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,11 +23,8 @@ RUN apt-get update \
|
|
|
23
23
|
# && rm -rf /var/lib/apt/lists/*
|
|
24
24
|
|
|
25
25
|
WORKDIR /myt
|
|
26
|
-
COPY pnpm-lock.yaml ./
|
|
27
|
-
RUN pnpm fetch --prod --frozen-lockfile --ignore-scripts
|
|
28
|
-
|
|
29
26
|
COPY package.json ./
|
|
30
|
-
RUN pnpm install --prod --
|
|
27
|
+
RUN pnpm install --prod --ignore-scripts
|
|
31
28
|
|
|
32
29
|
COPY . ./
|
|
33
30
|
RUN npm install -g /myt
|
package/myt-build.js
CHANGED
|
@@ -133,13 +133,8 @@ class Build extends Command {
|
|
|
133
133
|
const tagSha = tagHash.digest('hex');
|
|
134
134
|
const shortSha = tagSha.substring(0, cfg.gitShortLen);
|
|
135
135
|
|
|
136
|
-
let imageTag =
|
|
137
|
-
if (
|
|
138
|
-
imageTag = opts.tag;
|
|
139
|
-
} else if (shortSha) {
|
|
140
|
-
imageTag = shortSha;
|
|
141
|
-
if (realm) imageTag += `-${realm}`;
|
|
142
|
-
}
|
|
136
|
+
let imageTag = shortSha;
|
|
137
|
+
if (realm) imageTag += `-${realm}`;
|
|
143
138
|
|
|
144
139
|
const imageName = opts.name || cfg.code;
|
|
145
140
|
const tag = `${imageName}:${imageTag}`;
|
|
@@ -262,8 +257,12 @@ class Build extends Command {
|
|
|
262
257
|
if (realm)
|
|
263
258
|
buildArgs.push(`MYT_REALM=${realm}`);
|
|
264
259
|
|
|
260
|
+
const tags = [tag, `${imageName}:latest`];
|
|
261
|
+
if (opts.tag)
|
|
262
|
+
tags.push(`${imageName}:${opts.tag}`);
|
|
263
|
+
|
|
265
264
|
await docker.build(ctx.mytDir, {
|
|
266
|
-
tag:
|
|
265
|
+
tag: tags,
|
|
267
266
|
file: path.join(serverDir, 'Dockerfile'),
|
|
268
267
|
label: imageLabels,
|
|
269
268
|
buildArg: buildArgs
|