Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Jan 17, 2024
1 parent 0eb0c40 commit 1a45810
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/editor_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,23 @@ jobs:
# Fetch tags
git fetch --tags
# Check if there are any tags
if git describe --tags `git rev-list --tags --max-count=1` &>/dev/null; then
# Get latest tag, assuming the tag is in the format v[MAJOR].[MINOR], e.g., v1.0
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Latest tag: $latest_tag"
# Increment the minor version. If no tag found, start at v1.0
# Increment the minor version
if [[ $latest_tag =~ ^(v[0-9]+)\.([0-9]+)$ ]]; then
major=${BASH_REMATCH[1]}
minor=${BASH_REMATCH[2]}
new_tag="$major.$((minor+1))"
else
# Fallback if the tag doesn't match the expected format
new_tag="v1.0"
fi
else
# Start from v1.0 if no tags found
new_tag="v1.0"
fi
Expand Down

0 comments on commit 1a45810

Please sign in to comment.