Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
439c5e34
Unverified
Commit
439c5e34
authored
Sep 01, 2023
by
Omkar Salpekar
Committed by
GitHub
Sep 01, 2023
Browse files
Automate release changes (#7929)
parent
a3ba01a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
packaging/cut_release.sh
packaging/cut_release.sh
+36
-0
No files found.
packaging/cut_release.sh
0 → 100755
View file @
439c5e34
#!/usr/bin/env bash
#
# Usage (run from root of project):
# TEST_INFRA_BRANCH=release/2.1 RELEASE_BRANCH=release/2.1 RELEASE_VERSION=2.1.0 packaging/cut_release.sh
#
# TEST_INFRA_BRANCH: The release branch of test-infra that houses all reusable
# workflows
#
# RELEASE_BRANCH: The name of the release branch for this repo
#
# RELEASE_VERSION: Version of this current release
set
-eou
pipefail
# Create and Check out to Release Branch
git checkout
-b
"
${
RELEASE_BRANCH
}
"
# Change all GitHub Actions to reference the test-infra release branch
# as opposed to main.
for
i
in
.github/workflows/
*
.yml
;
do
if
[[
"
$OSTYPE
"
==
"darwin"
*
]]
;
then
sed
-i
''
-e
s#@main#@
"
${
TEST_INFRA_BRANCH
}
"
# $i;
sed
-i
''
-e
s#test-infra-ref:[[:space:]]main#
"test-infra-ref:
${
TEST_INFRA_BRANCH
}
"
# $i;
else
sed
-i
-e
s#@main#@
"
${
TEST_INFRA_BRANCH
}
"
# $i;
sed
-i
-e
s#test-infra-ref:[[:space:]]main#
"test-infra-ref:
${
TEST_INFRA_BRANCH
}
"
# $i;
fi
done
# Update the Release Version in version.txt
echo
"
${
RELEASE_VERSION
}
"
>
version.txt
# Optional
# git add ./github/workflows/*.yml version.txt
# git commit -m "[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}"
# git push origin "${RELEASE_BRANCH}"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment