Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans committed Dec 17, 2024
1 parent 114f099 commit 456dc90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ jobs:
if [[ "${{ github.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
echo "Release tag detected, using version: $VERSION"
sed -i "s/^version = .*/version = \"${VERSION}\"/" engine/Cargo.toml
sed -i "0,/^version = .*/s//version = \"${VERSION}\"/" engine/Cargo.toml
else
echo "No release tag detected, using version from Cargo.toml"
# parse version from Cargo.toml using regex
version=$(grep -oP 'version = "([^"]+?)"' engine/Cargo.toml | head -n 1 | sed 's/^version = "\(.*\)"$/\1/')
echo "Current version: $version"
sed -i "s/^version = .*/version = \"${version}-alpha\"/" engine/Cargo.toml
sed -i '0,/^version = .*/s//version = "'${version}'-alpha"/' engine/Cargo.toml
fi
# 🔨 Build our static binary
Expand Down

0 comments on commit 456dc90

Please sign in to comment.