From 6619c385ed5220293b4a9af1c405a364f0085bc9 Mon Sep 17 00:00:00 2001 From: orhun Date: Wed, 30 Jun 2021 01:26:32 +0300 Subject: [PATCH] chore(release): set the new version in release script --- RELEASE.md | 12 +++++------- release.sh | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index ae7de1f..a8613a5 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,10 +2,8 @@ [GitHub](https://github.com/orhun/git-cliff/releases), [crates.io](https://crates.io/crates/git-cliff/) and [Docker Hub](https://hub.docker.com/repository/docker/orhunp/git-cliff) releases are automated via [GitHub actions](./.github/workflows/cd.yml) and triggered by pushing a tag. -1. Bump the version in [Cargo.toml](./Cargo.toml) according to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -2. Update [Cargo.lock](./Cargo.lock) by building the project via `cargo build`. -3. Run the [release script](./release.sh): `./release.sh v[X.Y.Z]` -4. Push the changes: `git push` -5. Check if [Continuous Integration](https://github.com/orhun/git-cliff/actions) workflow is completed successfully. -6. Push the tags: `git push --tags` -7. Wait for [Continuous Deployment](https://github.com/orhun/git-cliff/actions) workflow to finish. +1. Run the [release script](./release.sh): `./release.sh v[X.Y.Z]` +2. Push the changes: `git push` +3. Check if [Continuous Integration](https://github.com/orhun/git-cliff/actions) workflow is completed successfully. +4. Push the tags: `git push --tags` +5. Wait for [Continuous Deployment](https://github.com/orhun/git-cliff/actions) workflow to finish. diff --git a/release.sh b/release.sh index 10e1460..f2253a7 100755 --- a/release.sh +++ b/release.sh @@ -2,6 +2,8 @@ # takes the tag as an argument (e.g. v0.1.0) if [ -n "$1" ]; then + # update the version + sed "0,/^version = .*$/s//version = \"${1#v}\"/" -i git-cliff*/Cargo.toml # update the changelog cargo run -- --tag "$1" > CHANGELOG.md git add -A && git commit -m "chore(release): prepare for $1"