File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 2323 run : |
2424 TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
2525 echo "Latest tag: $TAG"
26- echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
26+ # Remove 'v' and split into components
27+ VERSION=${TAG#v}
28+ IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
29+
30+ # Bump the minor version and reset patch to 0
31+ NEW_MINOR=$((MINOR + 1))
32+ NEW_VERSION="v$MAJOR.$NEW_MINOR.0"
33+
34+ echo "OLD_VERSION=$TAG" >> $GITHUB_ENV
35+ echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
2736
2837 # - name: Get release tag
2938 # id: get_tag
@@ -35,15 +44,15 @@ jobs:
3544 run : |
3645 FILE="client/src/app/page.tsx"
3746 OLD_VERSION_LINE=$(grep -Eo 'v[0-9]+\.[0-9]+\.[0-9]+' "$FILE")
38- echo "Old version: $OLD_VERSION_LINE"
39- sed -i "s/ $OLD_VERSION_LINE/${RELEASE_TAG}/" "$FILE "
40- echo "Updated $FILE with tag ${RELEASE_TAG} "
47+
48+ echo "Replacing: $OLD_VERSION_LINE, with: $NEW_VERSION "
49+ sed -i "s/$OLD_VERSION_LINE/$NEW_VERSION/" "$FILE "
4150
4251 - name : Print branch info
4352 run : |
4453 echo "Ref: ${{ github.ref }}"
4554 echo "Branch name: ${{ github.ref_name }}"
46-
55+
4756 - name : Commit and push changes
4857 run : |
4958 git config user.name "github-actions"
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function Page() {
1919 { /* If authenticated, display LoggedInPage (regular lounge app). If not, display LoggedOutPage component */ }
2020 { isAuthenticated ? < LoggedInPage /> : < LoggedOutPage /> }
2121 < div className = "fixed right-0 bottom-0 m-4 rounded bg-[#0D0D0E] p-2 text-gray-400 shadow" >
22- v1.3 .0
22+ v1.7 .0
2323 </ div >
2424 </ div >
2525 ) ;
You can’t perform that action at this time.
0 commit comments