Skip to content

Commit 0c7bdf0

Browse files
authored
fix(artifact): make sure the binaries don't depend on things in /tmp/build (#5)
1 parent 94039bc commit 0c7bdf0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ function main() {
9999

100100
curl -fsSLo atc-router.tar.gz https://github.com/hutchic/atc-router/releases/download/$ATC_ROUTER_VERSION/$package_architecture-unknown-$OSTYPE.tar.gz
101101
tar -C /tmp/build -xvf atc-router.tar.gz
102+
103+
sed -i 's/\/tmp\/build//' `grep -l -I -r '\/tmp\/build' /tmp/build/`
102104
}
103105

104106
# Retries a command a configurable number of times with backoff.

test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export $(grep -v '^#' $SCRIPT_DIR/.env | xargs)
1111

1212
function test() {
1313
cp -R /tmp/build/* /
14+
mv /tmp/build /tmp/buffer # Check we didn't link dependencies to `/tmp/build/...`
1415

1516
/usr/local/kong/bin/openssl version # From kong-openssl test.sh
1617
ls -la /usr/local/kong/lib/libyaml.so # From kong-openssl test.sh
@@ -22,6 +23,8 @@ function test() {
2223
ls -l /usr/local/openresty/lualib/resty/websocket/*.lua
2324
grep _VERSION /usr/local/openresty/lualib/resty/websocket/*.lua
2425
luarocks --version
26+
27+
mv /tmp/buffer /tmp/build
2528
}
2629

2730
test

0 commit comments

Comments
 (0)