Merge pull request 'fix: release.sh: cd in disinto_release() permanently changes CWD of calling shell (#323)' (#333) from fix/issue-323 into main
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
This commit is contained in:
commit
fcd892dce0
1 changed files with 14 additions and 12 deletions
|
|
@ -118,20 +118,22 @@ This PR creates a vault item for the release of version ${version}.
|
||||||
"
|
"
|
||||||
|
|
||||||
# Create branch from clean primary branch
|
# Create branch from clean primary branch
|
||||||
cd "$ops_root"
|
(
|
||||||
git checkout "$PRIMARY_BRANCH"
|
cd "$ops_root"
|
||||||
git pull origin "$PRIMARY_BRANCH"
|
git checkout "$PRIMARY_BRANCH"
|
||||||
git checkout -B "$branch_name" "$PRIMARY_BRANCH"
|
git pull origin "$PRIMARY_BRANCH"
|
||||||
|
git checkout -B "$branch_name" "$PRIMARY_BRANCH"
|
||||||
|
|
||||||
# Add and commit only the vault TOML file
|
# Add and commit only the vault TOML file
|
||||||
git add "vault/actions/${id}.toml"
|
git add "vault/actions/${id}.toml"
|
||||||
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
|
||||||
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
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
||||||
# Create PR
|
# Create PR
|
||||||
local pr_response
|
local pr_response
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue