mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-20 15:13:47 +01:00
fix(ci): link bunx after the SHA-verified Bun install in GitLab CI and the Ubicloud setup
This commit is contained in:
1 parent
80d75a77ae
commit
479c4972ed
3 files changed
+7
No files matched your search
@@ -19,6 +19,7 @@ variables:
|
||||
echo "36368faef7527875d5ffa52e53cd48021741f2a83eb6208a8dd64068d422a913 /tmp/bun.zip" | sha256sum -c -
|
||||
unzip -q /tmp/bun.zip -d /tmp/bun
|
||||
install -D -m 0755 /tmp/bun/bun-linux-x64/bun "$HOME/.bun/bin/bun"
|
||||
ln -sf bun "$HOME/.bun/bin/bunx"
|
||||
rm -rf /tmp/bun /tmp/bun.zip
|
||||
- export PATH="$HOME/.bun/bin:$PATH"
|
||||
- test "$(bun --version)" = "$BUN_VERSION"
|
||||
|
||||
@@ -31,6 +31,7 @@ if [ ! -x "$HOME/.bun/bin/bun" ]; then
|
||||
echo "36368faef7527875d5ffa52e53cd48021741f2a83eb6208a8dd64068d422a913 $bun_tmp/bun.zip" | sha256sum -c - >/dev/null
|
||||
unzip -q "$bun_tmp/bun.zip" -d "$bun_tmp"
|
||||
install -D -m 0755 "$bun_tmp/bun-linux-x64/bun" "$HOME/.bun/bin/bun"
|
||||
ln -sf bun "$HOME/.bun/bin/bunx"
|
||||
rm -rf "$bun_tmp"
|
||||
fi
|
||||
grep -q '.bun/bin' "$HOME/.profile" || echo 'export PATH="$HOME/.bun/bin:$PATH"' >>"$HOME/.profile"
|
||||
|
||||
@@ -201,6 +201,11 @@ describe('other CI Bun installs match the image (#1713, #1706)', () => {
|
||||
expect(source).toContain('test "$(bun --version)" = "$BUN_VERSION"');
|
||||
});
|
||||
|
||||
test(`${rel} links bunx next to the verified bun, as the bun.sh installer did`, () => {
|
||||
expect(source).toContain('ln -sf bun "$HOME/.bun/bin/bunx"');
|
||||
expect(source.indexOf('ln -sf bun "$HOME/.bun/bin/bunx"')).toBeGreaterThan(source.indexOf('unzip -q'));
|
||||
});
|
||||
|
||||
test(`${rel} pins the same Bun version and SHA-256 as Dockerfile.ci`, () => {
|
||||
expect(imageSha).toMatch(/^[0-9a-f]{64}$/);
|
||||
const hashes = [...source.matchAll(/echo "([0-9a-f]{64}) /g)].map((m) => m[1]);
|
||||
|
||||
Reference in new issue
Block a user