diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-20 00:52:37 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-20 00:52:37 +0200 |
commit | 0199dc41764667d0529d18bbf68e278e3f2617a5 (patch) | |
tree | 3a3d04c5838a9e6aaced7ac26b64b34cc0e228b3 /scripts/common | |
parent | 3dcb286ac40ab2c9ba7d10e984c85541e0d0a78a (diff) | |
download | dotty-0199dc41764667d0529d18bbf68e278e3f2617a5.tar.gz dotty-0199dc41764667d0529d18bbf68e278e3f2617a5.tar.bz2 dotty-0199dc41764667d0529d18bbf68e278e3f2617a5.zip |
Integrating with scala-infra for CI.
See https://github.com/scala/scala-jenkins-infra/pull/56
Diffstat (limited to 'scripts/common')
-rwxr-xr-x | scripts/common | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/common b/scripts/common new file mode 100755 index 000000000..c9453506d --- /dev/null +++ b/scripts/common @@ -0,0 +1,13 @@ +update() { + [[ -d $baseDir ]] || mkdir -p $baseDir + cd $baseDir + + if [ ! -d $baseDir/$2 ]; then git clone "https://github.com/$1/$2.git"; fi + + cd $2 + + git fetch --tags "https://github.com/$1/$2.git" + (git fetch "https://github.com/$1/$2.git" $3 && git checkout -fq FETCH_HEAD) #|| git checkout -fq $3 # || fallback is for local testing on tag + git reset --hard +} + |