Cleanup AppVeyor Git checkout more safely.
This commit is contained in:
+3
-23
@@ -2,12 +2,6 @@
|
|||||||
#
|
#
|
||||||
# Cleanup for Appveyor peculiarities.
|
# Cleanup for Appveyor peculiarities.
|
||||||
#
|
#
|
||||||
# This thing is dangerous. See "rm -rf *". It tries hard, but if it
|
|
||||||
# gets it wrong you will not be happy.
|
|
||||||
#
|
|
||||||
# Only run this on an Appveyor instance, where the consequences are
|
|
||||||
# nil.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Echo, eval, and error on shell commands.
|
# Echo, eval, and error on shell commands.
|
||||||
eeval()
|
eeval()
|
||||||
@@ -31,26 +25,12 @@ exec 0</dev/null
|
|||||||
# Mosh-specific environment
|
# Mosh-specific environment
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
# Make sure we're on Appveyor
|
|
||||||
if [ -z "$APPVEYOR_BUILD_FOLDER" ]; then
|
|
||||||
echo "$0: APPVEYOR_BUILD_FOLDER variable empty" >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make really, really sure we're in the build dir
|
|
||||||
cd $APPVEYOR_BUILD_FOLDER || exit 2
|
|
||||||
if [ "$(pwd)" = "$HOME" -o "$PWD" = "$HOME" ]; then
|
|
||||||
echo "$0: in home directory" >&2
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
before_build)
|
before_build)
|
||||||
# Check that we're in a Mosh repo with mosh-1.2.5, then clean it mercilessly
|
# This repo was checked out with Windows Git, repair it for Cygwin.
|
||||||
eeval git config --local core.symlinks true
|
eeval git config --local core.symlinks true
|
||||||
eeval "git describe 3c3b356cb5e387887499beb2eedddce185f36944 && rm -rf * && git reset --hard"
|
eeval git clean --force --quiet -x -d
|
||||||
|
eeval git reset --hard
|
||||||
;;
|
;;
|
||||||
build_script)
|
build_script)
|
||||||
eeval ./autogen.sh
|
eeval ./autogen.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user