Skip to content

Commit 60f2254

Browse files
committed
fix: tarball creation
1 parent 5dd8a90 commit 60f2254

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ jobs:
6161
- name: Create tarball
6262
run: |
6363
cd dist
64-
tar -czf devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz --transform 's/devproc-${{ matrix.target }}/devproc/' devproc-${{ matrix.target }}
64+
# Rename binary to 'devproc' for the tarball
65+
mv devproc-${{ matrix.target }} devproc
66+
tar -czf devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz devproc
6567
shasum -a 256 devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256
6668
6769
- name: Upload artifact

scripts/build.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ async function buildTarget(target: Target): Promise<string> {
7171
async function createTarball(binaryPath: string, target: Target): Promise<string> {
7272
const tarballName = `devproc-v${VERSION}-${target.name}.tar.gz`;
7373
const tarballPath = join(DIST_DIR, tarballName);
74-
const binaryName = target.outputName;
75-
76-
// Create tarball with just the binary renamed to 'devproc'
77-
await $`tar -czf ${tarballPath} -C ${DIST_DIR} --transform 's/${binaryName}/devproc/' ${binaryName}`;
78-
74+
const renamedBinary = join(DIST_DIR, "devproc");
75+
76+
// Rename binary to 'devproc' for the tarball (portable across BSD/GNU tar)
77+
await $`mv ${binaryPath} ${renamedBinary}`;
78+
await $`tar -czf ${tarballPath} -C ${DIST_DIR} devproc`;
79+
await $`mv ${renamedBinary} ${binaryPath}`;
80+
7981
console.log(` ✓ Created ${tarballName}`);
8082
return tarballPath;
8183
}

0 commit comments

Comments
 (0)