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
afbbae65
Commit
afbbae65
authored
3 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Improve download.sh by adding feature branch functionality
parent
8e103e71
No related branches found
Branches containing commit
No related tags found
3 merge requests
!68
Master merge
,
!24
Josh/local env migration
,
!11
Release
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download.sh
+58
-8
58 additions, 8 deletions
download.sh
with
58 additions
and
8 deletions
download.sh
+
58
−
8
View file @
afbbae65
#!/bin/bash
# If we are on a feature branch, add it to the eval list
FBRANCH
=
$(
git rev-parse
--abbrev-ref
HEAD
)
if
[[
"
$CI_BUILD_REF_NAME
"
!=
""
]]
;
then
FBRANCH
=
$CI_BUILD_REF_NAME
fi
FBRANCH
=
$(
echo
$FBRANCH
|
grep
feature
)
# Also check for the branch name without the "feature" on it.
FBRANCH2
=
$(
echo
$FBRANCH
|
sed
's/feature\///g'
)
LOCALPATH
=
$(
pwd
)
echo
"Local path:
$LOCALPATH
"
BINARYPATH
=
$LOCALPATH
/bin
# Clean up pathing
rm
-rf
gitlab.com/
*
rm
-rf
bin/
*
mkdir
-p
bin
mkdir
-p
bin
CHECKOUTBRANCH
=
""
setCheckoutBranch
()
{
CHECKOUTBRANCH
=
"release"
if
[
-z
"
$FBRANCH
"
]
;
then
CHECKOUTBRANCH
=
$FBRANCH
fi
if
[
-z
"
$FBRANCH2
"
]
;
then
CHECKOUTBRANCH
=
$FBRANCH2
fi
}
# Download client
git clone https://git.xx.network/elixxir/client gitlab.com/elixxir/client
pushd
gitlab.com/elixxir/client
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$
LOCALPATH
/bin
/client"
main.go
go build
-mod
vendor
-o
"
$
BINARYPATH
/client"
main.go
popd
# Download UD
echo
"Downloading user discovery..."
git clone https://git.xx.network/elixxir/user-discovery-bot gitlab.com/elixxir/user-discovery-bot
pushd
gitlab.com/elixxir/user-discovery-bot
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$
LOCALPATH
/bin
/udb"
main.go
go build
-mod
vendor
-o
"
$
BINARYPATH
/udb"
main.go
popd
echo
"Downloading permissioning server..."
# Download scheduling server
echo
"Downloading scheduling server..."
git clone https://git.xx.network/elixxir/registration gitlab.com/elixxir/registration
pushd
gitlab.com/elixxir/registration
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$
LOCALPATH
/bin
/permissioning"
main.go
go build
-mod
vendor
-o
"
$
BINARYPATH
/permissioning"
main.go
popd
# Download client registrar
echo
"Downloading client registrar"
git clone https://git.xx.network/elixxir/client-registrar.git gitlab.com/elixxir/client-registrar
pushd
gitlab.com/elixxir/client-registrar
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$
LOCALPATH
/bin
/client-registrar"
gitlab.com/elixxir/client-registrar
go build
-mod
vendor
-o
"
$
BINARYPATH
/client-registrar"
gitlab.com/elixxir/client-registrar
popd
# Download cMix node
echo
"Downloading cMix node..."
git clone https://git.xx.network/elixxir/server gitlab.com/elixxir/server
pushd
gitlab.com/elixxir/server
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$
LOCAL
PATH
/
bin/
server
"
main.go
go build
-mod
vendor
-o
"
$
BINARY
PATH
/server main
"
.go
popd
# Download cMix gateway
echo
"Downloading cMix gateway..."
git clone https://git.xx.network/elixxir/gateway gitlab.com/elixxir/gateway
pushd
gitlab.com/elixxir/gateway
setCheckoutBranch
git checkout
$CHECKOUTBRANCH
go mod vendor
-v
go mod tidy
go build
-mod
vendor
-o
"
$LOCALPATH
/bin/gateway"
main.go
make clean
go build
-mod
vendor
-o
"
$BINARYPATH
/gateway"
main.go
popd
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