Skip to content

Commit 669bf33

Browse files
committed
fix: remove induvidual tarballs and create induvidual checksums
1 parent 138cf9e commit 669bf33

2 files changed

Lines changed: 13 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ jobs:
9494
with:
9595
name: Build ${{ github.run_number }}
9696
tag_name: build-${{ github.run_number }}-${{ github.sha }}
97-
body: "Automated build #${{ github.run_number }} from commit ${{ github.sha }}."
97+
body: "Automated build #${{ github.run_number }} from commit ${{ github.sha }}"
9898
files: |
99-
release/chromatic-*
99+
release/chromatic-all.tar.gz
100+
release/chromatic-all.tar.gz.sha256
100101
release/chromatic-*.sha256
101102
draft: false
102103
prerelease: false

scripts/package-cli.js

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,34 +54,19 @@ console.log("cd dist");
5454
console.log("");
5555
console.log("mkdir -p ../release");
5656
console.log("");
57-
console.log("package_binary() {");
58-
console.log(' src="$1"');
59-
console.log(' out="$2"');
60-
console.log(' chmod +x "$src"');
61-
console.log(" # Copy binary directly");
62-
console.log(' cp "$src" "../release/$out"');
63-
console.log(" # Also create tarball");
64-
console.log(' cp "$src" chromatic');
65-
console.log(' tar -czf "../release/$out.tar.gz" chromatic');
66-
console.log(" rm -f chromatic");
67-
console.log("}");
68-
console.log("");
69-
7057
cliBuilds.forEach(({ binaryName, releaseName }) => {
71-
console.log(`package_binary "${binaryName}" "chromatic-${releaseName}"`);
58+
console.log(`chmod +x "${binaryName}"`);
59+
console.log(`cp "${binaryName}" "../release/chromatic-${releaseName}"`);
7260
});
7361

7462
console.log("");
7563
console.log("cd ../release");
7664
console.log("");
77-
console.log("# Create checksums for all files (binaries and tarballs)");
78-
console.log("for file in chromatic-*; do");
79-
console.log(' case "$file" in');
80-
console.log(" *.sha256) ;;");
81-
console.log(" *)");
82-
console.log(' if [ -f "$file" ]; then');
83-
console.log(' sha256sum "$file" > "$file.sha256"');
84-
console.log(" fi");
85-
console.log(" ;;");
86-
console.log(" esac");
87-
console.log("done");
65+
cliBuilds.forEach(({ releaseName }) => {
66+
console.log(`sha256sum "chromatic-${releaseName}" > "chromatic-${releaseName}.sha256"`);
67+
});
68+
console.log("");
69+
const binaryFiles = cliBuilds.map(({ releaseName }) => `chromatic-${releaseName}`).join(" ");
70+
console.log(`tar -czf chromatic-all.tar.gz ${binaryFiles}`);
71+
console.log("");
72+
console.log("sha256sum chromatic-all.tar.gz > chromatic-all.tar.gz.sha256");

0 commit comments

Comments
 (0)