chore: establish Sovereign AI reference
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
EXPECTED_REMOTE="https://git.intaleqapp.com/Hamza/sovereign_ai.git"
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
ACTUAL_REMOTE="$(git remote get-url origin)"
|
||||
if [[ "$ACTUAL_REMOTE" != "$EXPECTED_REMOTE" ]]; then
|
||||
echo "Refusing to push: origin must be $EXPECTED_REMOTE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BRANCH="$(git branch --show-current)"
|
||||
if [[ -z "$BRANCH" ]]; then
|
||||
echo "Refusing to push from a detached HEAD." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMMIT_MESSAGE="${1:-chore: update Sovereign AI reference}"
|
||||
git config --local credential.https://git.intaleqapp.com.provider generic
|
||||
git add --all
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -m "$COMMIT_MESSAGE"
|
||||
fi
|
||||
|
||||
git -c http.proxy= -c https.proxy= push --set-upstream origin "$BRANCH"
|
||||
Reference in New Issue
Block a user