Compare commits
1 commit
a7ad6eb32a
...
16d2b19440
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16d2b19440 |
2 changed files with 19 additions and 2 deletions
17
bin/disinto
17
bin/disinto
|
|
@ -2654,6 +2654,10 @@ disinto_release() {
|
||||||
local id="release-${version//./}"
|
local id="release-${version//./}"
|
||||||
local vault_toml="${ops_root}/vault/pending/${id}.toml"
|
local vault_toml="${ops_root}/vault/pending/${id}.toml"
|
||||||
|
|
||||||
|
# Read the release formula and inject version
|
||||||
|
local formula_content
|
||||||
|
formula_content=$(cat "$formula_path")
|
||||||
|
|
||||||
# Create vault TOML with the specific version
|
# Create vault TOML with the specific version
|
||||||
cat > "$vault_toml" <<EOF
|
cat > "$vault_toml" <<EOF
|
||||||
# vault/pending/${id}.toml
|
# vault/pending/${id}.toml
|
||||||
|
|
@ -2693,6 +2697,19 @@ This PR creates a vault item for the release of version ${version}.
|
||||||
git commit -m "$pr_title" -m "$pr_body" 2>/dev/null || true
|
git commit -m "$pr_title" -m "$pr_body" 2>/dev/null || true
|
||||||
|
|
||||||
# Push branch
|
# Push branch
|
||||||
|
local auth_url
|
||||||
|
auth_url=$(printf '%s' "http://dev-bot:${FORGE_TOKEN}@$(echo "$FORGE_URL" | sed 's|https\{0,1}://||')" )
|
||||||
|
local remote_url="${auth_url}/${PROJECT_REPO%/disinto}/.git"
|
||||||
|
|
||||||
|
if ! git remote get-url origin >/dev/null 2>&1; then
|
||||||
|
# Get the actual remote URL from FORGE_URL
|
||||||
|
local forge_host
|
||||||
|
forge_host=$(echo "$FORGE_URL" | sed 's|https\{0,1}://||' | sed 's|/.*||')
|
||||||
|
local org_repo
|
||||||
|
org_repo=$(echo "$PROJECT_REPO" | sed 's|.*||')
|
||||||
|
remote_url="http://dev-bot:${FORGE_TOKEN}@${forge_host}/${PROJECT_REPO}.git"
|
||||||
|
fi
|
||||||
|
|
||||||
git push -u origin "$branch_name" 2>/dev/null || {
|
git push -u origin "$branch_name" 2>/dev/null || {
|
||||||
echo "Error: failed to push branch" >&2
|
echo "Error: failed to push branch" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
#
|
#
|
||||||
# Example vault item (auto-generated by `disinto release v1.2.0`):
|
# Example vault item (auto-generated by `disinto release v1.2.0`):
|
||||||
#
|
#
|
||||||
# id = "release-v120"
|
# id = "release-v1-2-0"
|
||||||
# formula = "release"
|
# formula = "release"
|
||||||
# context = "Release v1.2.0"
|
# context = "Release v1.2.0"
|
||||||
# secrets = []
|
# secrets = []
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
# 6. restart-agents - Restart agent containers with new image
|
# 6. restart-agents - Restart agent containers with new image
|
||||||
# 7. commit-result - Write release result to tracking file
|
# 7. commit-result - Write release result to tracking file
|
||||||
|
|
||||||
id = "release-v120"
|
id = "release-v1-2-0"
|
||||||
formula = "release"
|
formula = "release"
|
||||||
context = "Release v1.2.0 — includes vault redesign, .profile system, architect agent"
|
context = "Release v1.2.0 — includes vault redesign, .profile system, architect agent"
|
||||||
secrets = []
|
secrets = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue