File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -19,21 +19,10 @@ jobs:
1919 run : |
2020 TAG_VERSION="${GITHUB_REF#refs/tags/v}"
2121 echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
22-
2322 MAJOR=$(echo "$TAG_VERSION" | cut -d. -f1)
2423 MINOR=$(echo "$TAG_VERSION" | cut -d. -f2)
2524 PATCH=$(echo "$TAG_VERSION" | cut -d. -f3)
2625
27- if [ "$PATCH" -gt 0 ]; then
28- # Patch release → bump patch
29- NEW_MAJOR=$MAJOR
30- NEW_MINOR=$MINOR
31- NEW_PATCH=$((PATCH + 1))
32- else
33- # Minor release → bump minor, reset patch
34- NEW_MAJOR=$MAJOR
35- NEW_MINOR=$((MINOR + 1))
36- NEW_PATCH=0
3726 # Always bump minor version and reset patch
3827 NEW_MAJOR=$MAJOR
3928 NEW_MINOR=$((MINOR + 1))
4534
4635 - name : Update version.h to DEV version
4736 run : |
48- FILE_PATH="api/ include/opentelemetry/version.h"
37+ FILE_PATH="include/opentelemetry/version.h"
4938 sed -i "s|#define OPENTELEMETRY_VERSION \".*\"|#define OPENTELEMETRY_VERSION \"${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}-DEV\"|" "$FILE_PATH"
5039 sed -i "s|#define OPENTELEMETRY_VERSION_MAJOR .*|#define OPENTELEMETRY_VERSION_MAJOR ${NEW_MAJOR}|" "$FILE_PATH"
5140 sed -i "s|#define OPENTELEMETRY_VERSION_MINOR .*|#define OPENTELEMETRY_VERSION_MINOR ${NEW_MINOR}|" "$FILE_PATH"
5544 run : |
5645 git config user.name "github-actions[bot]"
5746 git config user.email "github-actions[bot]@users.noreply.github.com"
58- git add api/ include/opentelemetry/version.h
47+ git add include/opentelemetry/version.h
5948 git commit -m "Bump version to ${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}-DEV after release" || echo "No changes to commit"
6049 git push origin main
61-
You can’t perform that action at this time.
0 commit comments