3Z4LPN - enable staging sync to devcpone
This commit is contained in:
@@ -28,6 +28,6 @@
|
|||||||
|
|
||||||
## Auto Sync ke Devcpone
|
## Auto Sync ke Devcpone
|
||||||
- Repo ini punya **post-commit hook** di `.githooks/post-commit` yang otomatis menjalankan `scripts/devcpone_sync.sh`.
|
- Repo ini punya **post-commit hook** di `.githooks/post-commit` yang otomatis menjalankan `scripts/devcpone_sync.sh`.
|
||||||
- Setiap `git commit` di branch `master` akan langsung rsync file yang berubah ke `devcpone.aplikasi.web.id:/home/one/project/one/one-ui/`.
|
- Setiap `git commit` di branch `master` atau `staging` akan langsung rsync file yang berubah ke `devcpone.aplikasi.web.id:/home/one/project/one/one-ui/`.
|
||||||
- Hook sudah aktif (`core.hooksPath = .githooks`), tidak perlu jalankan script deploy manual.
|
- Hook sudah aktif (`core.hooksPath = .githooks`), tidak perlu jalankan script deploy manual.
|
||||||
- Jangan bilang tidak ada hook/sync sebelum mengecek `.githooks/` dan `scripts/` terlebih dahulu.
|
- Jangan bilang tidak ada hook/sync sebelum mengecek `.githooks/` dan `scripts/` terlebih dahulu.
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
|
|
||||||
# Auto Sync ke Devcpone
|
# Auto Sync ke Devcpone
|
||||||
- Repo ini punya **post-commit hook** di `.githooks/post-commit` yang otomatis menjalankan `scripts/devcpone_sync.sh`.
|
- Repo ini punya **post-commit hook** di `.githooks/post-commit` yang otomatis menjalankan `scripts/devcpone_sync.sh`.
|
||||||
- Setiap `git commit` di branch `master` akan langsung rsync file yang berubah ke `devcpone.aplikasi.web.id:/home/one/project/one/one-ui/`.
|
- Setiap `git commit` di branch `master` atau `staging` akan langsung rsync file yang berubah ke `devcpone.aplikasi.web.id:/home/one/project/one/one-ui/`.
|
||||||
- Hook sudah aktif (`core.hooksPath = .githooks`), tidak perlu jalankan script deploy manual.
|
- Hook sudah aktif (`core.hooksPath = .githooks`), tidak perlu jalankan script deploy manual.
|
||||||
- Jangan bilang tidak ada hook/sync sebelum mengecek `.githooks/` dan `scripts/` terlebih dahulu.
|
- Jangan bilang tidak ada hook/sync sebelum mengecek `.githooks/` dan `scripts/` terlebih dahulu.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ repo_root=$(git rev-parse --show-toplevel)
|
|||||||
cd "$repo_root"
|
cd "$repo_root"
|
||||||
|
|
||||||
branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null || true)
|
branch=$(git symbolic-ref --quiet --short HEAD 2>/dev/null || true)
|
||||||
if [ "$branch" != "master" ]; then
|
if [ "$branch" != "master" ] && [ "$branch" != "staging" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user