Skip to content

Commit

Permalink
fix(release): Continue release config
Browse files Browse the repository at this point in the history
  • Loading branch information
szinn committed Aug 3, 2024
2 parents 8d485cf + 8d485cf commit 8668c45
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 21 deletions.
5 changes: 3 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ tasks:
desc: Push and build the release
silent: true
cmds:
- git push
- git push --tags
- scripts/release {{.release}}
vars:
release: '{{ or .release (fail "Argument (release) is required") }}'
19 changes: 0 additions & 19 deletions scripts/create-release
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,3 @@ cargo build
# Update the changelog
git cliff --config cliff.toml --tag "$1" >CHANGELOG.md
prettier -w CHANGELOG.md

# git add -A && git commit -m "chore(release): Prepare for $1"
# git show

# generate a changelog for the tag message
export GIT_CLIFF_TEMPLATE="\
{% for group, commits in commits | group_by(attribute=\"group\") %}
{{ group | upper_first }}\
{% for commit in commits %}
- {% if commit.breaking %}(breaking) {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end=\"\") }})\
{% endfor %}
{% endfor %}"
changelog=$(git cliff --config cliff.toml --unreleased --strip all)

# create a signed tag
# git tag -a "$1" -m "Release $1" -m "$changelog"
echo "${changelog}"
# echo "Done!"
# echo "Now push the commit (git push) and the tag (git push --tags)."
16 changes: 16 additions & 0 deletions scripts/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

export GIT_CLIFF_TEMPLATE="\
{% for group, commits in commits | group_by(attribute=\"group\") %}
{{ group | upper_first }}\
{% for commit in commits %}
- {% if commit.breaking %}(breaking) {% endif %}{{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end=\"\") }})\
{% endfor %}
{% endfor %}"
changelog=$(git cliff --config cliff.toml --unreleased --strip all)

git checkout main
git fetch -p && git pull
git tag -a "$1" -m "Release $1" -m "${changelog}"

git push --tags

0 comments on commit 8668c45

Please sign in to comment.