From 39d894198313aa9c03297ba45a3be51baf56bc3a Mon Sep 17 00:00:00 2001 From: "sas.fajri" Date: Mon, 27 Apr 2026 10:53:30 +0700 Subject: [PATCH] Add devcpone bootstrap --- README.md | 15 +++++++++++++++ scripts/devcpone_bootstrap.sh | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 README.md create mode 100755 scripts/devcpone_bootstrap.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..68ee769 --- /dev/null +++ b/README.md @@ -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` diff --git a/scripts/devcpone_bootstrap.sh b/scripts/devcpone_bootstrap.sh new file mode 100755 index 0000000..a283ca3 --- /dev/null +++ b/scripts/devcpone_bootstrap.sh @@ -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"