forked from lix-project/hydra
* Add 'set -e' to all scm test setup scripts, to catch errors as early as possible
* Fix git setup
This commit is contained in:
parent
478d3863bb
commit
9a7811aa92
|
@ -1,4 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
repo="$1"
|
repo="$1"
|
||||||
STATE_FILE=$(pwd)/.bzr-state
|
STATE_FILE=$(pwd)/.bzr-state
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# This script is used both by git & deepgit checks.
|
# This script is used both by git & deepgit checks.
|
||||||
|
set -e
|
||||||
|
|
||||||
repo=git-repo
|
repo=git-repo
|
||||||
|
export HOME=$(pwd)
|
||||||
STATE_FILE=$(pwd)/.git-state
|
STATE_FILE=$(pwd)/.git-state
|
||||||
if test -e $STATE_FILE; then
|
if test -e $STATE_FILE; then
|
||||||
state=$(cat $STATE_FILE)
|
state=$(cat $STATE_FILE)
|
||||||
|
@ -10,15 +12,18 @@ else
|
||||||
state=0;
|
state=0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "STATE: $state"
|
||||||
case $state in
|
case $state in
|
||||||
(0) echo "::Create repo. -- continue -- updated::"
|
(0) echo "::Create repo. -- continue -- updated::"
|
||||||
git init $repo
|
git init $repo
|
||||||
cd $repo
|
cd $repo
|
||||||
|
git config --global user.email "you@example.com"
|
||||||
|
git config --global user.name "Your Name"
|
||||||
|
|
||||||
touch foo
|
touch foo
|
||||||
git add foo
|
git add foo
|
||||||
git commit -m "Add foo"
|
git commit -m "Add foo"
|
||||||
git tag -a -m "First Tag." tag0
|
git tag -a -m "First Tag." tag0
|
||||||
git checkout -b master HEAD
|
|
||||||
;;
|
;;
|
||||||
(1) echo "::Create new commit. -- continue -- updated::"
|
(1) echo "::Create new commit. -- continue -- updated::"
|
||||||
cd $repo
|
cd $repo
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
repo="$1"
|
repo="$1"
|
||||||
STATE_FILE=$(pwd)/.hg-state
|
STATE_FILE=$(pwd)/.hg-state
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
repo="$1"
|
repo=svn-repo
|
||||||
STATE_FILE=$(pwd)/.svn-state
|
STATE_FILE=$(pwd)/.svn-state
|
||||||
if test -e $STATE_FILE; then
|
if test -e $STATE_FILE; then
|
||||||
state=$(cat $STATE_FILE)
|
state=$(cat $STATE_FILE)
|
||||||
|
@ -12,7 +13,7 @@ fi
|
||||||
case $state in
|
case $state in
|
||||||
(0) echo "::Create repo. -- continue -- updated::"
|
(0) echo "::Create repo. -- continue -- updated::"
|
||||||
svnadmin create svn-repo
|
svnadmin create svn-repo
|
||||||
svn co $repo svn-checkout
|
svn co file://$PWD/$repo svn-checkout
|
||||||
touch svn-checkout/svn-file
|
touch svn-checkout/svn-file
|
||||||
svn add svn-checkout/svn-file
|
svn add svn-checkout/svn-file
|
||||||
svn commit -m "add svn file" svn-checkout/svn-file
|
svn commit -m "add svn file" svn-checkout/svn-file
|
||||||
|
|
Loading…
Reference in a new issue