Skip to content
Snippets Groups Projects
Commit 6162dfc1 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Update README and add a check in download_cmix_binaries.sh

parent a5bd1142
No related branches found
No related tags found
1 merge request!68Master merge
...@@ -103,8 +103,8 @@ using these utility scripts can speed up the process. ...@@ -103,8 +103,8 @@ using these utility scripts can speed up the process.
### Additional Set Up ### Additional Set Up
You will need to add a personal access token to your environment vars to download binaries via the 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), `download_cmix_binaries.sh`. You can generate one [here](https://git.xx.network/-/profile/personal_access_tokens),
giving it the "api" scope. giving it the "api" and "read_repository" scope.
Please add the following to your `~/.zshrc` or `~/.bash_profile` depending on your shell 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). (You could most likely find out what shell you're using by running `echo $0` in the terminal).
......
...@@ -50,6 +50,12 @@ fi ...@@ -50,6 +50,12 @@ fi
DEFAULTBRANCH=${DEFAULTBRANCH:="release"} DEFAULTBRANCH=${DEFAULTBRANCH:="release"}
if [[ $USEREPO == "d" ]]; then if [[ $USEREPO == "d" ]]; then
REPOS_API=${REPOS_API:="https://git.xx.network/api/v4/projects/elixxir%2F"} 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 else
REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"} REPOS_API=${REPOS_API:="https://elixxir-bins.s3-us-west-1.amazonaws.com"}
fi fi
...@@ -72,6 +78,7 @@ FBRANCH2=$(echo $FBRANCH | sed 's/feature\///g') ...@@ -72,6 +78,7 @@ FBRANCH2=$(echo $FBRANCH | sed 's/feature\///g')
echo "Checking for binaries at $FBRANCH $FBRANCH2 $DEFAULTBRANCH..." echo "Checking for binaries at $FBRANCH $FBRANCH2 $DEFAULTBRANCH..."
echo "(Note: if you forced a branch, that is checked first!)" echo "(Note: if you forced a branch, that is checked first!)"
for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
echo "Attempting downloads from: $BRANCH" echo "Attempting downloads from: $BRANCH"
if [[ $USEREPO == "d" ]]; then if [[ $USEREPO == "d" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment