diff --git a/README.md b/README.md index 28a91641fc892b646200d80a60a9c46571d6e5bd..a99e23d5b9c1629c353fdd2494ed0d414536040f 100644 --- a/README.md +++ b/README.md @@ -103,8 +103,8 @@ using these utility scripts can speed up the process. ### Additional Set Up You will need to add a personal access token to your environment vars to download binaries via the -`download_cmix_binaries.sh`. You can generate one [here](https://gitlab.com/-/profile/personal_access_tokens), -giving it the "api" scope. +`download_cmix_binaries.sh`. You can generate one [here](https://git.xx.network/-/profile/personal_access_tokens), +giving it the "api" and "read_repository" scope. Please add the following to your `~/.zshrc` or `~/.bash_profile` depending on your shell (You could most likely find out what shell you're using by running `echo $0` in the terminal). @@ -135,4 +135,4 @@ servers. However, the information it provides is sometimes useful. So, if you make changes that break integration and merge the fixes to the `master` branch of integration, you ought to also merge the `master` branch -into the `benchmark` branch so that the benchmarks will continue to function. \ No newline at end of file +into the `benchmark` branch so that the benchmarks will continue to function. diff --git a/download_cmix_binaries.sh b/download_cmix_binaries.sh index e9a4d39352e748d32d878fc65734b9a7588ba06b..5573e29fa735472e2a45ece3f311d5ce49b7e026 100755 --- a/download_cmix_binaries.sh +++ b/download_cmix_binaries.sh @@ -50,6 +50,12 @@ fi DEFAULTBRANCH=${DEFAULTBRANCH:="release"} if [[ $USEREPO == "d" ]]; then REPOS_API=${REPOS_API:="https://git.xx.network/api/v4/projects/elixxir%2F"} + BRANCH_URL=${BRANCH_URL:="jobs/artifacts/master/raw/release"} + curl -f -L -H "PRIVATE-TOKEN: $GITLAB_ACCESS_TOKEN" -o /dev/null "${REPOS_API}user-discovery-bot/$BRANCH_URL/udb$BIN" + if [[ $? != 0 ]]; then + echo "Bad GITLAB_ACCESS_TOKEN. You need a https://git.xx.network/-/profile/personal_access_tokens with api and read_repository access." + exit -1 + fi else REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"} fi @@ -72,6 +78,7 @@ FBRANCH2=$(echo $FBRANCH | sed 's/feature\///g') echo "Checking for binaries at $FBRANCH $FBRANCH2 $DEFAULTBRANCH..." echo "(Note: if you forced a branch, that is checked first!)" + for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do echo "Attempting downloads from: $BRANCH" if [[ $USEREPO == "d" ]]; then