Skip to content

Commit d0f1d63

Browse files
committed
Deploy script
1 parent 94c09f1 commit d0f1d63

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

deploy.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ BASE=$(git merge-base @ @{u})
99
if [ $LOCAL = $REMOTE ]; then
1010
echo "Local repository is already up to date."
1111
elif [ $LOCAL = $BASE ]; then
12+
CHANGES=$(git diff --name-only "$LOCAL" "$REMOTE")
1213
git pull
1314
if [ $? -eq 0 ]; then
14-
echo "Updated repository. Building with Grunt..."
15-
grunt build
16-
echo "Build done."
15+
echo "Repository updated."
16+
if grep -q "\.js$\|\.css$" <<< "$CHANGES"; then
17+
echo "Grunt build required. Building..."
18+
grunt build
19+
echo "Build done."
20+
else
21+
echo "No Grunt build required."
22+
fi
1723
else
1824
echo "Repository update failed. Aborting..."
1925
fi

0 commit comments

Comments
 (0)