Skip to content

Commit

Permalink
Make the "get-latest-tgf.sh" script support ARM
Browse files Browse the repository at this point in the history
+ Make the "get-latest-tgf.sh" script support ARM
+ Add a test workflow for our install script

J:DEF-160
  • Loading branch information
JPLachance committed Jun 26, 2023
1 parent 5f825fc commit d98c315
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test TGF installation

on:
pull_request:
branches:
- master
jobs:
build:
name: Install

strategy:
matrix:
os: [ macos-latest, ubuntu-latest ]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install TGF
run: |
./get-latest-tgf.sh
6 changes: 4 additions & 2 deletions get-latest-tgf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ script_end () {
install_latest_tgf () {
if [[ $(uname -s) == Linux ]]
then
echo 'Installing latest tgf version for Linux in' $TGF_PATH '...'
curl -sL "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_linux_64-bits.zip" | gzip -d > ${TGF} && chmod +x ${TGF} && script_end
LINUX_ARCH=$(uname -m)
echo 'Installing latest tgf for Linux with arch '$LINUX_ARCH' in' $TGF_PATH '...'
DOWNLOAD_URL=$([ "$LINUX_ARCH" == "x86_64" ] && echo "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_linux_64-bits.zip" || echo "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_linux_arm64-bits.zip")
curl -sL $DOWNLOAD_URL | gzip -d > ${TGF} && chmod +x ${TGF} && script_end
elif [[ $(uname -s) == Darwin ]]
then
OSX_ARCH=$(uname -m)
Expand Down

0 comments on commit d98c315

Please sign in to comment.