2019-07-20 17:21:04 +03:00
|
|
|
# These env variables need to be set before running this script
|
2019-07-06 21:03:07 +03:00
|
|
|
# FILE="test.html"
|
|
|
|
# BUILD="1.1.0"
|
|
|
|
# NAME="development"
|
2019-07-20 17:21:04 +03:00
|
|
|
DIRECTORY='elm-ui-testing'
|
2019-07-06 19:52:36 +03:00
|
|
|
|
|
|
|
# Check to see if the repo is already cloned locally
|
2019-07-06 21:03:07 +03:00
|
|
|
cd tmp
|
|
|
|
if [ ! -d "$DIRECTORY" ]; then
|
|
|
|
git clone git@github.com:mdgriffith/elm-ui-testing.git
|
|
|
|
else
|
|
|
|
git pull
|
|
|
|
fi
|
2019-07-20 17:21:04 +03:00
|
|
|
mkdir -p "$DIRECTORY/public/tests/$BUILD/$NAME/"
|
|
|
|
cp "$FILE" "$DIRECTORY/public/tests/$BUILD/$NAME/index.html"
|
|
|
|
if [ -z "$(git status --porcelain)" ]; then
|
|
|
|
# Working directory clean
|
|
|
|
echo "No changes need for $BUILD -> $NAME"
|
|
|
|
else
|
|
|
|
cd "$DIRECTORY"
|
|
|
|
# Uncommitted changes
|
2020-03-14 02:59:38 +03:00
|
|
|
git config --global user.email "$GIT_EMAIL"
|
|
|
|
git config --global user.name "$GIT_NAME"
|
2019-07-20 17:21:04 +03:00
|
|
|
git add .
|
|
|
|
git commit -m "Elm UI test for $NAME on $BUILD"
|
|
|
|
git push origin master
|
|
|
|
|
|
|
|
echo "Files published for for $BUILD -> $NAME"
|
|
|
|
fi
|
|
|
|
|
2019-07-06 19:52:36 +03:00
|
|
|
|