From ce4aeda0e5516a4dd1e4741a4b11db61e30bec6a Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Wed, 9 Mar 2022 13:39:29 +0100 Subject: [PATCH 1/4] Fix v0.13.0 changelog entry --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6969264f..ff503d3f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog +## [Unreleased](https://github.com/CosmWasm/cw-plus/tree/HEAD) + +[Full Changelog](https://github.com/CosmWasm/cw-plus/compare/v0.13.0...HEAD) + ## [v0.13.0](https://github.com/CosmWasm/cw-plus/tree/v0.13.0) (2022-03-09) -[Full Changelog](https://github.com/CosmWasm/cw-plus/compare/v0.12.1...HEAD) +[Full Changelog](https://github.com/CosmWasm/cw-plus/compare/v0.12.1...0.13.0) **Breaking changes:** From 44f65e674c780c2b61a1ab529db69a7e8d8f4da5 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Wed, 9 Mar 2022 15:17:12 +0100 Subject: [PATCH 2/4] Add "add upcoming entry" option to update_changelog --- scripts/update_changelog.sh | 38 +++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/scripts/update_changelog.sh b/scripts/update_changelog.sh index 6b2900615..36fe6cbc8 100755 --- a/scripts/update_changelog.sh +++ b/scripts/update_changelog.sh @@ -1,19 +1,28 @@ #!/bin/bash - +set -o errexit -o pipefail ORIGINAL_OPTS=$* -OPTS=$(getopt -l "help,since-tag:,full,token:" -o "hft" -- "$@") || exit 1 +OPTS=$(getopt -l "help,since-tag:,upcoming-tag:,full,token:" -o "hu:ft" -- "$@") || exit 1 + +function print_usage() { + echo -e "Usage: $0 [-h|--help] [-f|--full] [--since-tag ] [-u|--upcoming-tag] [-t|--token ] +-h, --help Display help +-f, --full Process changes since the beginning (by default: since latest git version tag) +--since-tag Process changes since git version tag (by default: since latest git version tag) +-u, --upcoming-tag Add a title in CHANGELOG for the new changes +--token Pass changelog github token " +} + +function remove_opt() { + ORIGINAL_OPTS=$(echo "$ORIGINAL_OPTS" | sed "s/\\B$1\\b//") +} eval set -- "$OPTS" while true do case $1 in -h|--help) - echo -e "Usage: $0 [-h|--help] [-f|--full] [--since-tag ] [-t|--token ] --h, --help Display help --f, --full Process changes since the beginning (by default: since latest git version tag) ---since-tag Process changes since git version tag (by default: since latest git version tag) ---token Pass changelog github token " + print_usage exit 0 ;; --since-tag) @@ -22,7 +31,13 @@ case $1 in ;; -f|--full) TAG="" - ORIGINAL_OPTS=$(echo "$ORIGINAL_OPTS" | sed "s/\\B$1\\b//") + remove_opt $1 + ;; + -u|--upcoming-tag) + remove_opt $1 + shift + UPCOMING_TAG="$1" + remove_opt $1 ;; --) shift @@ -50,4 +65,11 @@ sed -i -n "/^## \\[${TAG}[^]]*\\]/,\$p" CHANGELOG.md github_changelog_generator -u CosmWasm -p cw-plus --base CHANGELOG.md $ORIGINAL_OPTS || cp /tmp/CHANGELOG.md.$$ CHANGELOG.md +if [ -n "$UPCOMING_TAG" ] +then + # Add "upcoming" version tag + TODAY=$(date "+%Y-%m-%d") + sed -i "s+\[Full Changelog\](https://github.com/CosmWasm/cw-plus/compare/\(.*\)\.\.\.HEAD)+[Full Changelog](https://github.com/CosmWasm/cw-plus/compare/$UPCOMING_TAG...HEAD)\n\n## [$UPCOMING_TAG](https://github.com/CosmWasm/cw-plus/tree/$UPCOMING_TAG) ($TODAY)\n\n[Full Changelog](https://github.com/CosmWasm/cw-plus/compare/\1...$UPCOMING_TAG)+" CHANGELOG.md +fi + rm -f /tmp/CHANGELOG.md.$$ From 592e3154242cdef1870b1d201a294689a40a77c1 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Wed, 9 Mar 2022 15:19:06 +0100 Subject: [PATCH 3/4] Add --help for set_version --- scripts/set_version.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/set_version.sh b/scripts/set_version.sh index 26987c1ff..019b8125d 100755 --- a/scripts/set_version.sh +++ b/scripts/set_version.sh @@ -1,14 +1,14 @@ #!/bin/bash set -o errexit -o nounset -o pipefail -command -v shellcheck > /dev/null && shellcheck "$0" +command -v shellcheck >/dev/null && shellcheck "$0" function print_usage() { - echo "Usage: $0 NEW_VERSION" - echo "" - echo "e.g. $0 0.8.0" + echo "Usage: $0 [-h|--help] " + echo "e.g.: $0 0.8.0" } -if [ "$#" -ne 1 ]; then +if [ "$#" -ne 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] +then print_usage exit 1 fi From 160fb06697f91162bbdeea5861357a297296facd Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Wed, 9 Mar 2022 15:21:21 +0100 Subject: [PATCH 4/4] Add --help to publish.sh --- scripts/publish.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 8c4bee118..afd4c696b 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,6 +1,17 @@ #!/bin/bash set -o errexit -o nounset -o pipefail -command -v shellcheck > /dev/null && shellcheck "$0" +command -v shellcheck >/dev/null && shellcheck "$0" + +function print_usage() { + echo "Usage: $0 [-h|--help]" + echo "Publishes crates to crates.io." +} + +if [ "$1" = "-h" ] || [ "$1" = "--help" ] +then + print_usage + exit 1 +fi # this should really more to cosmwasm... STORAGE_PACKAGES="storage-plus"