Skip to content

Commit

Permalink
Simplify ANNIS CLI download script to only support linux
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskrause committed Nov 28, 2023
1 parent ed705a4 commit 0c10083
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2
- name: Set JAVA_HOME to included JDK 8
run: echo JAVA_HOME=$JAVA_HOME_8_X64 >> $GITHUB_ENV
- run: misc/download-annis-cli.sh 2.2.0
- run: misc/download-annis-cli.sh 3.0.0
env:
OS_NAME: linux
- run: misc/import-test-corpora.sh
Expand Down
27 changes: 6 additions & 21 deletions misc/download-annis-cli.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

GRAPHANNIS_VERSION=${1:-2.2.0}
GRAPHANNIS_VERSION=${1:-3.0.0}

install_graphannis_cli=false

Expand All @@ -21,25 +21,10 @@ fi
if [ "$install_graphannis_cli" = true ] ; then
echo "Installing graphANNIS CLI version ${GRAPHANNIS_VERSION}"

if [[ "$OS_NAME" == "linux" ]];
then
rm -f $HOME/.cargo/bin/annis
curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-unknown-linux-gnu.tar.xz
tar xf annis.tar.xz -C $HOME/.cargo/bin/
elif [[ "$OS_NAME" == "osx" ]];
then
rm -f $HOME/.cargo/bin/annis
curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-apple-darwin.tar.xz
tar xf annis.tar.xz -C $HOME/.cargo/bin/
elif [[ "$OS_NAME" == "windows" ]];
then
del /s /q $HOME/.cargo/bin/annis.exe
curl -L -o annis.zip https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-pc-windows-msvc.zip
Expand-Archive -Path annis.zip -DestinationPath $HOME/.cargo/bin/annis.exe

else
>&2 echo "Unknown value \"${OS_NAME}\" for environment variable OS_NAME"
exit 1
fi

rm -f $HOME/.cargo/bin/annis
curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-unknown-linux-gnu.tar.xz
tar xf annis.tar.xz
mv graphannis-cli-x86_64-unknown-linux-gnu/annis $HOME/.cargo/bin/
fi

0 comments on commit 0c10083

Please sign in to comment.