Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
154c2a2e
Commit
154c2a2e
authored
4 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Update download script to do the right things by default
parent
f231a98f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download_cmix_binaries.sh
+54
-34
54 additions, 34 deletions
download_cmix_binaries.sh
with
54 additions
and
34 deletions
download_cmix_binaries.sh
+
54
−
34
View file @
154c2a2e
#!/usr/bin/env bash
# Get platform parameter
# === LINUX ===
if
[[
$1
==
"l"
]]
||[[
$1
==
"linux"
]]
||
[[
-z
$1
]]
;
then
if
[[
$2
==
"d"
]]
;
then
BIN
=
".linux64?job=build"
else
BIN
=
".linux64"
# DEFAULTS FOR INTEGRATION -- do not publish
if
[
"
$GITLAB_ACCESS_TOKEN
"
==
""
]
then
echo
"ERROR: SET GITLAB_ACCESS_TOKEN in your environment"
exit
-1
fi
echo
"Platform set to Linux"
# === MACOS ===
elif
[[
$1
==
"m"
]]
||
[[
$1
==
"mac"
]]
;
then
if
[[
$2
==
"d"
]]
;
then
BIN
=
".darwin64?job=build"
else
BIN
=
".darwin64"
PLATFORM
=
$1
USEREPO
=
$2
if
[
"
$PLATFORM
"
==
""
]
then
PLATFORM
=
"l"
fi
if
[
"
$USEREPO
"
==
""
]
then
USEREPO
=
"d"
fi
# Get platform parameter
# === LINUX ===
if
[[
$PLATFORM
==
"l"
]]
||[[
$PLATFORM
==
"linux"
]]
||
[[
-z
$PLATFORM
]]
;
then
if
[[
$USEREPO
==
"d"
]]
;
then
BIN
=
".linux64?job=build"
else
BIN
=
".linux64"
fi
echo
"Platform set to Linux"
# === MACOS ===
elif
[[
$PLATFORM
==
"m"
]]
||
[[
$PLATFORM
==
"mac"
]]
;
then
if
[[
$USEREPO
==
"d"
]]
;
then
BIN
=
".darwin64?job=build"
else
BIN
=
".darwin64"
fi
echo
"Platform set to Mac"
else
echo
"Invalid platform argument:
$
1
"
echo
"Invalid platform argument:
$
PLATFORM
"
exit
0
fi
# Set up the URL for downloading the binaries
DEFAULTBRANCH
=
${
DEFAULTBRANCH
:
=
"release"
}
if
[[
$
2
==
"d"
]]
;
then
if
[[
$
USEREPO
==
"d"
]]
;
then
REPOS_API
=
${
REPOS_API
:
=
"https://gitlab.com/api/v4/projects/elixxir%2F"
}
else
REPOS_API
=
${
REPOS_API
:
=
"https://elixxir-bins.s3-us-west-1.amazonaws.com"
}
...
...
@@ -54,23 +74,23 @@ 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
[[
$
2
==
"d"
]]
;
then
BRANCH_URL
=
${
BRANCH_URL
:
=
"jobs/artifacts/
$BRANCH
/raw/release"
}
# Get URLs for artifacts from all relevant repos
UDB_URL
=
${
UDB_URL
:
=
"
${
REPOS_API
}
user-discovery-bot/
$BRANCH_URL
/udb
$BIN
"
}
SERVER_URL
=
${
SERVER_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/server
$BIN
"
}
GW_URL
=
${
GW_URL
:
=
"
${
REPOS_API
}
gateway/
$BRANCH_URL
/gateway
$BIN
"
}
PERMISSIONING_URL
=
${
PERMISSIONING_URL
:
=
"
${
REPOS_API
}
registration/
$BRANCH_URL
/registration
$BIN
"
}
CLIENT_URL
=
${
CLIENT_URL
:
=
"
${
REPOS_API
}
client/
$BRANCH_URL
/client
$BIN
"
}
SERVER_GPU_URL
=
${
SERVER_GPU_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/server-cuda.linux64?job=build"
}
GPULIB_URL
=
${
GPULIB_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/libpowmosm75.so?job=build"
}
else
UDB_URL
=
${
UDB_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/udb
$BIN
"
}
SERVER_URL
=
${
SERVER_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/server
$BIN
"
}
GW_URL
=
${
GW_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/gateway
$BIN
"
}
PERMISSIONING_URL
=
${
PERMISSIONING_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/registration.stateless
$BIN
"
}
CLIENT_URL
=
${
CLIENT_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/client
$BIN
"
}
fi
if
[[
$
USEREPO
==
"d"
]]
;
then
BRANCH_URL
=
${
BRANCH_URL
:
=
"jobs/artifacts/
$BRANCH
/raw/release"
}
# Get URLs for artifacts from all relevant repos
UDB_URL
=
${
UDB_URL
:
=
"
${
REPOS_API
}
user-discovery-bot/
$BRANCH_URL
/udb
$BIN
"
}
SERVER_URL
=
${
SERVER_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/server
$BIN
"
}
GW_URL
=
${
GW_URL
:
=
"
${
REPOS_API
}
gateway/
$BRANCH_URL
/gateway
$BIN
"
}
PERMISSIONING_URL
=
${
PERMISSIONING_URL
:
=
"
${
REPOS_API
}
registration/
$BRANCH_URL
/registration
$BIN
"
}
CLIENT_URL
=
${
CLIENT_URL
:
=
"
${
REPOS_API
}
client/
$BRANCH_URL
/client
$BIN
"
}
SERVER_GPU_URL
=
${
SERVER_GPU_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/server-cuda.linux64?job=build"
}
GPULIB_URL
=
${
GPULIB_URL
:
=
"
${
REPOS_API
}
server/
$BRANCH_URL
/libpowmosm75.so?job=build"
}
else
UDB_URL
=
${
UDB_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/udb
$BIN
"
}
SERVER_URL
=
${
SERVER_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/server
$BIN
"
}
GW_URL
=
${
GW_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/gateway
$BIN
"
}
PERMISSIONING_URL
=
${
PERMISSIONING_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/registration.stateless
$BIN
"
}
CLIENT_URL
=
${
CLIENT_URL
:
=
"
${
REPOS_API
}
/
$BRANCH
/client
$BIN
"
}
fi
set
-x
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment