Skip to content

Commit 60c3c95

Browse files
authored
🚑 v1.2.1 adj git cmd to support older versions of git and check dev branch gets pushed (#40)
* ✨🐛 adds check for fetching changes only and fixes various bugs closes #36 🐛 committed changes aren’t pushing back closes #34 🐛 web server not pushing commits back to devops closes #35 🐛 code miss-match closes #31 ✨ OPTARG to just get changes if there are any * 🔖 v1.2.0 released * 🚑 v1.2.1 adj git cmd to support older versions of git and check dev branch gets pushed * 🔖 Patch for servers running older versions of Git
1 parent f163402 commit 60c3c95

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# WordPress SSH Git CI
22

33
**Creator:** Ryan Valizan -- [@devnetkc](https://github.com/devnetkc)
4-
**Latest Release:** [v1.2.0](https://github.com/devnetkc/wordpress-ssh-git-ci/releases/tag/v1.2.0)
4+
**Latest Release:** [v1.2.1](https://github.com/devnetkc/wordpress-ssh-git-ci/releases/tag/v1.2.1)
55
**Wiki:** [How To Use](https://github.com/devnetkc/wordpress-ssh-git-ci/wiki)
66
**Tags:** git, WordPress, Bash, ci, Azure Azure DevOps, SiteGround, SSH, Azure Pipeline
77
**License:** GPLv3

wp-git-sync.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# WordPress SSH Git CI Script
4-
# v1.2.0
4+
# v1.2.1
55

66
# Set argument parameters on start
77
BRANCH=live
@@ -324,14 +324,17 @@ set_defaults() {
324324
# Method models
325325

326326
dev_branch_push() {
327-
output=$(git branch --show-current )
327+
output=$(git symbolic-ref --short HEAD )
328328
case $output in
329329
*"dev"*)
330330
push_branch "devops" "$DEVBRANCH";;
331331
esac
332332
}
333333

334334
get_new_release() {
335+
# Make sure it's not missing a push back
336+
dev_branch_push
337+
335338
if [[ $FETCH == "true" ]]; then
336339
return;
337340
fi
@@ -377,9 +380,6 @@ clean_repository() {
377380
error3
378381
fi
379382

380-
# Create new live
381-
go_live "$DEVBRANCH"
382-
383383
print_status_msg "Changes on the WordPress site have been commited, and were pushed to $DEVBRANCH branch"
384384
}
385385

@@ -410,8 +410,6 @@ add_or_remove_devops "add"
410410
# Option selected to just query for changes
411411

412412
if [[ $DIRTYBRANCH == "false" ]] ; then
413-
# Make sure it's not missing a push back
414-
dev_branch_push
415413
# Working directory clean
416414
print_status_msg "Working directory clean"
417415
get_new_release

0 commit comments

Comments
 (0)