File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,16 @@ git --work-tree "$deploy_directory" reset --mixed --quiet
40
40
41
41
git --work-tree " $deploy_directory " add --all
42
42
43
- if git --work-tree " $deploy_directory " diff --exit-code --quiet HEAD; then
44
- echo No changes to files in $deploy_directory . Skipping commit.
45
- else
46
- set_user_id
47
- git --work-tree " $deploy_directory " commit -m \
48
- " publish: $commit_title " $' \n\n ' " generated from commit $commit_hash "
49
- git push origin $deploy_branch
50
- fi
43
+ case ` git --work-tree " $deploy_directory " diff --exit-code --quiet HEAD` in
44
+ 0) echo No changes to files in $deploy_directory . Skipping commit.;;
45
+ 1)
46
+ set_user_id
47
+ git --work-tree " $deploy_directory " commit -m \
48
+ " publish: $commit_title " $' \n\n ' " generated from commit $commit_hash "
49
+ git push origin $deploy_branch
50
+ ;;
51
+ * ) exit 1;;
52
+ esac
51
53
52
54
if [[ $previous_branch = " HEAD" ]]; then
53
55
# we weren't on any branch before, so just set HEAD back to the commit it was on
You can’t perform that action at this time.
0 commit comments