Add devcpone bootstrap

This commit is contained in:
sas.fajri
2026-04-27 10:53:30 +07:00
parent 2fa45e3e74
commit 39d8941983
2 changed files with 28 additions and 0 deletions

15
README.md Normal file
View File

@@ -0,0 +1,15 @@
# BE_CPONE
## Devcpone sync
This repo includes a local git hook setup for syncing changes to devcpone.
Run this once in a fresh clone:
```sh
./scripts/devcpone_bootstrap.sh
```
After that, pushing `master` will sync changed files to:
`one@devcpone.aplikasi.web.id:/home/one/project/one/one-api`

13
scripts/devcpone_bootstrap.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
repo_root=$(git rev-parse --show-toplevel)
git config --local core.hooksPath .githooks
if [ ! -x "$repo_root/.githooks/pre-push" ]; then
chmod +x "$repo_root/.githooks/pre-push" "$repo_root/.githooks/post-commit" 2>/dev/null || true
fi
printf '%s\n' "devcpone hooks enabled for this checkout"
printf '%s\n' "push to master will sync to one@devcpone.aplikasi.web.id:/home/one/project/one/one-api"