Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

cut_release.sh 1.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  1. #!/usr/bin/env bash
  2. #
  3. # Usage (run from root of project):
  4. # TEST_INFRA_BRANCH=release/2.1 RELEASE_BRANCH=release/2.1 RELEASE_VERSION=2.1.0 packaging/cut_release.sh
  5. #
  6. # TEST_INFRA_BRANCH: The release branch of test-infra that houses all reusable
  7. # workflows
  8. #
  9. # RELEASE_BRANCH: The name of the release branch for this repo
  10. #
  11. # RELEASE_VERSION: Version of this current release
  12. set -eou pipefail
  13. # Create and Check out to Release Branch
  14. git checkout -b "${RELEASE_BRANCH}"
  15. # Change all GitHub Actions to reference the test-infra release branch
  16. # as opposed to main.
  17. for i in .github/workflows/*.yml; do
  18. if [[ "$OSTYPE" == "darwin"* ]]; then
  19. sed -i '' -e s#@main#@"${TEST_INFRA_BRANCH}"# $i;
  20. sed -i '' -e s#test-infra-ref:[[:space:]]main#"test-infra-ref: ${TEST_INFRA_BRANCH}"# $i;
  21. else
  22. sed -i -e s#@main#@"${TEST_INFRA_BRANCH}"# $i;
  23. sed -i -e s#test-infra-ref:[[:space:]]main#"test-infra-ref: ${TEST_INFRA_BRANCH}"# $i;
  24. fi
  25. done
  26. # Update the Release Version in version.txt
  27. echo "${RELEASE_VERSION}" >version.txt
  28. # Optional
  29. # git add ./github/workflows/*.yml version.txt
  30. # git commit -m "[RELEASE-ONLY CHANGES] Branch Cut for Release {RELEASE_VERSION}"
  31. # git push origin "${RELEASE_BRANCH}"
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...