Check for local untracked files when deploying (#168)
* Check for local untracked files when deploying * Compress test for untracked files to 1 line Co-authored-by: Maruan <alshedivat@users.noreply.github.com> * Add vendor to .gitignore * Add .bundle to .gitignore Co-authored-by: Maruan Al-Shedivat <alshedivat.maruan@gmail.com>
This commit is contained in:
parent
c4be6f8457
commit
e2353bcc8f
|
|
@ -1,7 +1,9 @@
|
||||||
_site
|
_site
|
||||||
|
.bundle
|
||||||
.sass-cache
|
.sass-cache
|
||||||
.jekyll-metadata
|
.jekyll-metadata
|
||||||
.DS_store
|
.DS_store
|
||||||
.ruby-version
|
.ruby-version
|
||||||
.tweet-cache/
|
.tweet-cache/
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
vendor
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,15 @@ if ! git diff-index --quiet HEAD --; then
|
||||||
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
|
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if there are any untracked files
|
||||||
|
if ! test -z "$(git ls-files --exclude-standard --others)"; then
|
||||||
|
echo "There are untracked files:"
|
||||||
|
git ls-files --exclude-standard --others
|
||||||
|
echo "Please commit those files or stash them before proceeding."
|
||||||
|
echo "Aborting."
|
||||||
|
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Switch to source branch (creates it if necessary from the current branch)
|
# Switch to source branch (creates it if necessary from the current branch)
|
||||||
if [ `git branch | grep $SRC_BRANCH | tr ' ' '\n' | tail -1` ]
|
if [ `git branch | grep $SRC_BRANCH | tr ' ' '\n' | tail -1` ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue