@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 CHANGED
@@ -9,7 +9,7 @@ development, so any help is welcomed! Feel free to contribute.
9
9
  ## Requirements
10
10
 
11
11
  * Git
12
- * Docker (Optional, used to manage local server)
12
+ * Docker >= 23 with BuildKit (Optional, used to manage local server)
13
13
 
14
14
  ## Installation
15
15
 
@@ -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 --frozen-lockfile --ignore-scripts
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 = 'latest';
137
- if (opts.tag) {
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: [tag, imageName],
265
+ tag: tags,
267
266
  file: path.join(serverDir, 'Dockerfile'),
268
267
  label: imageLabels,
269
268
  buildArg: buildArgs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdnatura/myt",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "author": "Verdnatura Levante SL",
5
5
  "description": "MySQL version control",
6
6
  "license": "GPL-3.0",