diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-04 17:38:32 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-02-04 17:38:32 +0100 |
commit | 32826f3c989e63f53510a9bdccd1855a9ae00636 (patch) | |
tree | 8f16fc8e7cb218a508bf58ee959ad7a978d6721f /test/utils.bash | |
parent | fc7a39f18241ab731d87f7a80ef2bf36151dc184 (diff) | |
download | app.sh-32826f3c989e63f53510a9bdccd1855a9ae00636.tar.gz app.sh-32826f3c989e63f53510a9bdccd1855a9ae00636.tar.bz2 app.sh-32826f3c989e63f53510a9bdccd1855a9ae00636.tar.xz app.sh-32826f3c989e63f53510a9bdccd1855a9ae00636.zip |
o Adding a file resolver.
o Getting the IT to work on windows.
Diffstat (limited to 'test/utils.bash')
-rw-r--r--[-rwxr-xr-x] | test/utils.bash | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/test/utils.bash b/test/utils.bash index 3c3f33f..cb2337b 100755..100644 --- a/test/utils.bash +++ b/test/utils.bash @@ -8,6 +8,7 @@ exit_usage_wrong=0 setup() { find test/data -name \*.zip | xargs rm -f + ORIG_PATH=$PATH PATH=/bin:/usr/bin PATH=$PATH:$APPSH_HOME APPSH_HOME=$(cd $BATS_TEST_DIRNAME/..; echo `pwd`) @@ -18,6 +19,7 @@ setup() { REPO=$BATS_TMPDIR/repo REPO_URL="file://$REPO" + FIXED_REPO_URL="file://`fix_path $REPO`" if [ "`declare -f setup_inner >/dev/null; echo $?`" = 0 ] then @@ -40,12 +42,10 @@ mkzip() { } install_artifact() { - if [ ! -f $REPO/org/example/app-a/1.0-SNAPSHOT/maven-metadata.xml ] - then - mvn deploy:deploy-file -Durl=$REPO_URL \ - -Dfile=`echo $APPSH_HOME/test/data/app-a.zip` -DgeneratePom \ - -DgroupId=org.example -DartifactId=app-a -Dversion=1.0-SNAPSHOT -Dpackaging=zip - fi + describe -Dfile=`fix_path $APPSH_HOME/test/data/app-a.zip` -DgeneratePom + PATH=$ORIG_PATH mvn deploy:deploy-file -Durl=$FIXED_REPO_URL \ + -Dfile=`fix_path $APPSH_HOME/test/data/app-a.zip` -DgeneratePom \ + -DgroupId=org.example -DartifactId=app-a -Dversion=1.0-SNAPSHOT -Dpackaging=zip } app() { @@ -61,6 +61,18 @@ app_libexec() { run "$x" $@ } +fix_path=`uname -s` +fix_path() { + local path=$1 + + case $fix_path in + CYGWIN_NT*) + x=$(cygpath -wa $1) + ;; + esac + echo $x +} + describe() { echo "# " $@ >&3 } |