Skip to content

Commit

Permalink
update client binary only if newer (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivailop authored Oct 11, 2021
1 parent dc3f0b9 commit 519ac1a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Testspace Setup CLI'
description: 'Setup Testspace client to publish CI results from workflow to Dashboard; report flaky tests, metrics, graphs, and analytics'
author: 'S2 Technologies, Inc.'
inputs:
domain:
domain:
description: 'Testspace domain name'
required: true
token:
Expand All @@ -13,26 +13,29 @@ branding:
icon: terminal
runs:
using: 'composite'
steps:
steps:
- run: |
if [ `uname -m` != 'x86_64' ]; then echo 'Error: Not supported platform.' && exit 1; fi
case `uname -s` in
Linux)
folder=$HOME/bin
mkdir -p $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $RUNNER_TEMP
cp -f -p -u $RUNNER_TEMP/testspace $folder
;;
Darwin)
folder=$HOME/bin
mkdir -p $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $folder
curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz | tar -zxvf- -C $RUNNER_TEMP
rsync -t -u $RUNNER_TEMP/testspace $folder
;;
*) # Windows
folder=$LOCALAPPDATA\Programs\testspace
mkdir -p "$folder"
curl -OsSL https://testspace-client.s3.amazonaws.com/testspace-windows.zip
unzip -q -o testspace-windows.zip -d "$folder"
unzip -q -o testspace-windows.zip -d $RUNNER_TEMP
rm testspace-windows.zip
cp -f -p -u $RUNNER_TEMP/testspace.exe "$folder"
;;
esac
echo "$folder" >> $GITHUB_PATH
Expand Down

0 comments on commit 519ac1a

Please sign in to comment.