@arcadible/github-release-tools 1.0.15 → 1.0.17
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 +2 -1
- package/bin/arctool-put-artifact.sh +6 -0
- package/package.json +2 -1
- package/src/assert-dir.js +1 -1
- package/src/assert-tag.js +1 -1
- package/src/install-deps.js +2 -2
- package/src/put-artifact.js +46 -0
- package/src/put-build.js +1 -1
- package/src/put-cache.js +2 -2
- package/src/put-deploy-dir.js +1 -1
- package/src/put-prerelease.js +1 -1
- package/src/put-version.js +1 -1
- /package/src/{io.js → util/io.js} +0 -0
- /package/src/{lockfile.js → util/lockfile.js} +0 -0
package/README.md
CHANGED
|
@@ -31,8 +31,9 @@ When `arc deploy git` pushes a release tag, the Arcadible Release workflow build
|
|
|
31
31
|
| `arctool-put-deploy-dir <manifest>` | Outputs `deploy_dir` |
|
|
32
32
|
| `arctool-put-cache <manifest>` | Outputs `cache`, the package manager whose lockfile is beside the manifest |
|
|
33
33
|
| `arctool-install-deps <dir>` | Installs the project's dependencies exactly as its lockfile pins them |
|
|
34
|
+
| `arctool-put-artifact <file>` | Checks that `arc pack` wrote the package, and outputs `artifact`, its path |
|
|
34
35
|
|
|
35
|
-
`<manifest>` is the file `arc inspect --json` writes. Each `put` command writes its value to the step's `GITHUB_OUTPUT`. `arctool-install-deps` runs `npm ci`, or pnpm or Yarn through corepack, and does nothing without a lockfile. A command that fails says why on stderr, and exits 1.
|
|
36
|
+
`<manifest>` is the file `arc inspect --json` writes. `<file>` is the package `arc pack` wrote. Each `put` command writes its value to the step's `GITHUB_OUTPUT`. `arctool-install-deps` runs `npm ci`, or pnpm or Yarn through corepack, and does nothing without a lockfile. A command that fails says why on stderr, and exits 1.
|
|
36
37
|
|
|
37
38
|
## License
|
|
38
39
|
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"arctool-assert-dir": "bin/arctool-assert-dir.sh",
|
|
5
5
|
"arctool-assert-tag": "bin/arctool-assert-tag.sh",
|
|
6
6
|
"arctool-install-deps": "bin/arctool-install-deps.sh",
|
|
7
|
+
"arctool-put-artifact": "bin/arctool-put-artifact.sh",
|
|
7
8
|
"arctool-put-build": "bin/arctool-put-build.sh",
|
|
8
9
|
"arctool-put-cache": "bin/arctool-put-cache.sh",
|
|
9
10
|
"arctool-put-deploy-dir": "bin/arctool-put-deploy-dir.sh",
|
|
@@ -32,5 +33,5 @@
|
|
|
32
33
|
"scripts": {
|
|
33
34
|
"test": "node --test \"test/**/*.test.js\""
|
|
34
35
|
},
|
|
35
|
-
"version": "1.0.
|
|
36
|
+
"version": "1.0.17"
|
|
36
37
|
}
|
package/src/assert-dir.js
CHANGED
package/src/assert-tag.js
CHANGED
package/src/install-deps.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// arctool-put-artifact <file>: the package arc pack wrote, a file that isn't
|
|
3
|
+
// empty. Unlike the other put commands, it takes a path, not the manifest,
|
|
4
|
+
// and doesn't look at the format, so a package that isn't a zip needs no
|
|
5
|
+
// change here.
|
|
6
|
+
|
|
7
|
+
// [import]
|
|
8
|
+
|
|
9
|
+
const fs = require("node:fs");
|
|
10
|
+
|
|
11
|
+
// [import]
|
|
12
|
+
|
|
13
|
+
const io = require("./util/io");
|
|
14
|
+
|
|
15
|
+
// [use]
|
|
16
|
+
|
|
17
|
+
const fail = io.fail;
|
|
18
|
+
const run = io.run;
|
|
19
|
+
const statSync = fs.statSync; // eslint-disable-line no-sync
|
|
20
|
+
const write = io.write;
|
|
21
|
+
|
|
22
|
+
// [define]
|
|
23
|
+
|
|
24
|
+
const file = process.argv[2];
|
|
25
|
+
|
|
26
|
+
// [main]
|
|
27
|
+
|
|
28
|
+
run(() => {
|
|
29
|
+
if (!file) {
|
|
30
|
+
fail("No file provided.");
|
|
31
|
+
}
|
|
32
|
+
const info = statSync(file, { throwIfNoEntry: false });
|
|
33
|
+
if (!info) {
|
|
34
|
+
fail(`Unable to find: ${file}`, "arc pack didn't write it.");
|
|
35
|
+
}
|
|
36
|
+
if (!info.isFile()) {
|
|
37
|
+
fail(
|
|
38
|
+
`Unable to find: ${file}`,
|
|
39
|
+
"It's a folder, and the package is a file.",
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
if (info.size === 0) {
|
|
43
|
+
fail(`Unable to use: ${file}`, "It's empty.");
|
|
44
|
+
}
|
|
45
|
+
write(file);
|
|
46
|
+
});
|
package/src/put-build.js
CHANGED
package/src/put-cache.js
CHANGED
package/src/put-deploy-dir.js
CHANGED
package/src/put-prerelease.js
CHANGED
package/src/put-version.js
CHANGED
|
File without changes
|
|
File without changes
|