Skip to content

Commit

Permalink
Update script and beta workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Goerentz <m.goerentz@t-online.de>
  • Loading branch information
marcelGoerentz committed Dec 30, 2024
1 parent 6b49234 commit 50e1432
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
- name: Set build number
id: set-build-number
run: |
new_version=$(bash ${GITHUB_WORKSPACE}/Utility/set_buildnumber.sh ${{ vars.BUILD_NUMBER }})
echo "new_version=${new_version}" >> $GITHUB_ENV
echo "new_version=${new_version}" >> $GITHUB_OUTPUT
bash ${GITHUB_WORKSPACE}/Utility/set_buildnumber.sh ${{ vars.BUILD_NUMBER }}
- name: Update repo variable
run: |
Expand Down
7 changes: 2 additions & 5 deletions Utility/set_buildnumber.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ fi

new_build=$(($1 + 1))

echo "New build number is: $new_build"

# Extract the version number
version=$(grep 'const Version' "threadfin.go" | sed 's/.*Version = "\(.*\)"/\1/')

Expand All @@ -21,8 +19,6 @@ minor=${version_parts[1]}
patch=${version_parts[2]}
new_version="$major.$minor.$patch.$new_build"

echo "New version is: $new_version"

# Update the version in the file
sed -i "s/const Version = \".*\"/const Version = \"$new_version\"/" threadfin.go

Expand All @@ -32,4 +28,5 @@ echo "NEW_BUILD=$new_build" >> $GITHUB_ENV
# Export the new Version to the GitHub environment
echo "NEW_VERSION=$new_version" >> $GITHUB_ENV

echo "$new_version"
# Set the output for the GitHub Actions step
echo "new_version=$new_version" >> $GITHUB_OUTPUT

0 comments on commit 50e1432

Please sign in to comment.