Skip to content

Commit 48d7030

Browse files
committed
Makefile bug fix.
1 parent 42c8bfb commit 48d7030

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

Makefile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,33 @@ CARGO_TOML = Cargo.toml
55

66
VERSION_FILE = version.tmp
77

8-
# Bump the version based on the version increment (patch, minor, major)
98
bump_version:
10-
@echo "Bumping version in Cargo.toml"
11-
# Bump version using cargo-release or manually (patch, minor, or major)
12-
cargo release $(VERSION_INCREMENT) --no-publish --no-verify
13-
14-
# Get the new version from the Cargo.toml
15-
NEW_VERSION=$(shell grep -oP 'version\s*=\s*"\K[0-9\.]+' $(CARGO_TOML))
9+
@echo "Bumping version in Cargo.toml"
10+
# Bump version using cargo-release or manually (patch, minor, or major)
11+
cargo release $(VERSION_INCREMENT) --no-publish --no-verify
1612

17-
# Display new version
18-
@echo "New version: $(NEW_VERSION)"
13+
# Get the new version from the Cargo.toml
14+
NEW_VERSION=$(shell grep -oP 'version\s*=\s*"\K[0-9\.]+' $(CARGO_TOML))
15+
16+
# Display new version
17+
@echo "New version: $(NEW_VERSION)"
1918

2019
# Create a Git tag based on the bumped version
2120
create_tag: bump_version
22-
@echo "Creating Git tag for version $(NEW_VERSION)"
23-
git tag -a v$(NEW_VERSION) -m "Release version v$(NEW_VERSION)"
24-
git push origin v$(NEW_VERSION)
21+
@echo "Creating Git tag for version $(NEW_VERSION)"
22+
git tag -a v$(NEW_VERSION) -m "Release version v$(NEW_VERSION)"
23+
git push origin v$(NEW_VERSION)
2524

2625
# Default target to bump the version and create a tag for patch
2726
release_patch: bump_patch create_tag
28-
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
27+
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
2928

3029
# Default target to bump the version and create a tag for minor
3130
release_minor: bump_minor create_tag
32-
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
31+
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
3332

3433
# Default target to bump the version and create a tag for major
3534
release_major: bump_major create_tag
36-
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
35+
@echo "Release created with version $(NEW_VERSION) and tag v$(NEW_VERSION)"
3736

3837

0 commit comments

Comments
 (0)