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
a3fc67b7
Commit
a3fc67b7
authored
5 years ago
by
Jono
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to set project branches individually or as a group via
environment variables
parent
a5740147
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
update.sh
+38
-8
38 additions, 8 deletions
update.sh
with
38 additions
and
8 deletions
update.sh
+
38
−
8
View file @
a3fc67b7
#!/bin/bash
# This intended for updating the tested repos and their dependencies to the
# latest versions before running the integration test.
# latest versions before running the integration test. All runtime options are
# set via environemnt variables:
# defaultBranch sets branch to use for all projects
# clientBranch sets branch to use for the client repository
# serverBranch sets branch to use for the server repository
# gatewayBranch sets branch to use for the gateway repository
# udbBranch sets branch to use for the user-discovery-bot repository
# regBranch sets branch to use for the registration repository
# Default branch to use when no explicit project branch is set. If not set, then
# it defaults to "master".
default
=
"
${
defaultBranch
-
"master"
}
"
# Array of project names.
project_arr
=(
client
server
gateway
user-discovery-bot
registration
)
# Array of each project's branch. If a branch is not explicitly set via an
# environemnt variable, then it defaults to defaultBranch.
branch_arr
=(
"
${
clientBranch
-
$default
}
"
"
${
serverBranch
-
$default
}
"
"
${
gatewayBranch
-
$default
}
"
"
${
udbBranch
-
$default
}
"
"
${
regBranch
-
$default
}
"
)
update
()
{
git stash
git clean
-ffdx
git checkout
master
git checkout
"
$1
"
git pull
glide c
c
&&
glide up
glide c
ache-clear
&&
glide up
date
}
for
DIR
in
client server gateway user-discovery-bot registration
;
do
echo
$DIR
pushd
$GOPATH
/src/gitlab.com/elixxir/client
update
for
((
i
=
0
;
i<
${#
project_arr
[@]
}
;
++i
))
;
do
printf
"
\n\0
33[1m%s
\0
33[0m
\n
"
"
${
project_arr
[i]
}
"
pushd
"
$GOPATH
"
/src/gitlab.com/elixxir/client
||
exit
update
"
${
branch_arr
[i]
}
"
go
test
./...
popd
popd
||
exit
done
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