Skip to content

Commit

Permalink
chore: Add new-release-tag command to Makefile. Update version of rus…
Browse files Browse the repository at this point in the history
…t crate to match GitHub release version. Update release template. (#57)
  • Loading branch information
MexicanAce authored Aug 11, 2023
1 parent 7051cda commit d55dafc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
## 📋 Summary
🐛 **Critical Bug Fixes:**
🐛 **Bug Fixes:**
✨ **New Features:**
⚠️ **Breaking Changes:**
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "era_test_node"
version = "1.0.3"
version = "0.0.1-alpha"
edition = "2018"
authors = ["The Matter Labs Team <hello@matterlabs.dev>"]
homepage = "https://zksync.io/"
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,11 @@ all: build-contracts rust-build
# Clean everything
clean: clean-contracts

.PHONY: build-contracts clean-contracts rebuild-contracts rust-build lint test all clean build-%
# Create new draft release based on Cargo.toml version
new-release-tag:
@VERSION_NUMBER=$$(grep '^version =' Cargo.toml | awk -F '"' '{print $$2}') && \
git tag -a v$$VERSION_NUMBER -m "Release v$$VERSION_NUMBER" && \
echo "\n\033[0;32mGit tag creation SUCCESSFUL! Use the following command to push the tag:\033[0m" && \
echo "git push origin v$$VERSION_NUMBER"

.PHONY: build-contracts clean-contracts rebuild-contracts rust-build lint test all clean build-% new-release-tag
9 changes: 3 additions & 6 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ Once the draft is reviewed and any required changes are made, we can finalize an
To trigger the release pipeline, you'll need to create and push a Git tag. Here are the commands:

```bash
# Create a tag
git tag -a v[VERSION_NUMBER] -m "Release v[VERSION_NUMBER]"

# Push the tag to the repository
git push origin v[VERSION_NUMBER]
make new-release-tag
# Be sure to run the 'git push' command included in the output
```

Replace `[VERSION_NUMBER]` with the desired version number. This will trigger the `check.yaml` and `test.yaml` workflows, and `release.yaml`.
The version number comes from [Cargo.toml](../Cargo.toml). This will trigger the `check.yaml` and `test.yaml` workflows, and `release.yaml`.

0 comments on commit d55dafc

Please sign in to comment.