Skip to content

Commit

Permalink
fix(artifact): make sure the binaries don't depend on things in /tmp/…
Browse files Browse the repository at this point in the history
…build (#5)
  • Loading branch information
hutchic authored Dec 6, 2022
1 parent 94039bc commit 0c7bdf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ function main() {

curl -fsSLo atc-router.tar.gz https://github.com/hutchic/atc-router/releases/download/$ATC_ROUTER_VERSION/$package_architecture-unknown-$OSTYPE.tar.gz
tar -C /tmp/build -xvf atc-router.tar.gz

sed -i 's/\/tmp\/build//' `grep -l -I -r '\/tmp\/build' /tmp/build/`
}

# Retries a command a configurable number of times with backoff.
Expand Down
3 changes: 3 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export $(grep -v '^#' $SCRIPT_DIR/.env | xargs)

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

/usr/local/kong/bin/openssl version # From kong-openssl test.sh
ls -la /usr/local/kong/lib/libyaml.so # From kong-openssl test.sh
Expand All @@ -22,6 +23,8 @@ function test() {
ls -l /usr/local/openresty/lualib/resty/websocket/*.lua
grep _VERSION /usr/local/openresty/lualib/resty/websocket/*.lua
luarocks --version

mv /tmp/buffer /tmp/build
}

test

0 comments on commit 0c7bdf0

Please sign in to comment.