Skip to content

Commit

Permalink
Allow to run a patched car (#52)
Browse files Browse the repository at this point in the history
Signed-off-by: Dhi Aurrahman <[email protected]>
  • Loading branch information
dio authored Feb 21, 2025
1 parent 1056151 commit ce7cc60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v3

- name: "Install car and netlify-cli"
- name: "Install Go" # So we can run a patched car without needing to release a new version.
uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: "Install netlify-cli"
run: |
car_version=1.0.1
car_url=https://github.com/tetratelabs/car/releases/download/v${car_version}/car_${car_version}_linux_amd64.tar.gz
curl -sSL ${car_url} | tar -C /usr/local/bin -xzf -
npm install --save-dev netlify-cli
- name: "Archive Envoy Release"
Expand Down
7 changes: 4 additions & 3 deletions bin/car_envoy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ set -ue
# Envoy® is a registered trademark of The Linux Foundation in the United States and/or other countries

# Ensure we have tools we need installed
car >/dev/null
curl --version >/dev/null
jq --version >/dev/null
go version >/dev/null
curl="curl -fsSL"
gocar="go run github.com/tetratelabs/car/cmd/car@5277562d927e44ed994abe15d07f04e35e9eb445"

# Verify args
version=${1?version is required. Ex v1.18.3 or v1.18.3_debug}
Expand All @@ -55,10 +56,10 @@ if [ "${debug:-}" = '1' ] && [ "${os}" != 'linux' ]; then
fi

case ${mode} in
list) car="car --vv -t --platform ${platform}" ;;
list) car="${gocar} --vv -t --platform ${platform}" ;;
extract)
[ "${os}" = 'windows' ] && directory=${directory}/bin
car="car -x --platform ${platform} -C ${directory}"
car="${gocar} -x --platform ${platform} -C ${directory}"
;;
*) echo >&2 "invalid mode ${mode}" && exit 1 ;;
esac
Expand Down

0 comments on commit ce7cc60

Please sign in to comment.