Compare commits

...

14 Commits

Author SHA1 Message Date
Taiki Endo
7b2bc6ded8 Release 1.1.6 2022-02-20 11:26:34 +09:00
Taiki Endo
49d23019d2 Update cargo-llvm-cov and shfmt 2022-02-20 11:13:16 +09:00
Taiki Endo
9ac80a595c Revert "Update wasmtime to 0.34.1"
This reverts commit a3c80c04ed.

There is no x86_64 linux binary in https://github.com/bytecodealliance/wasmtime/releases/tag/v0.34.1.
2022-02-17 13:13:38 +09:00
Taiki Endo
a3c80c04ed Update wasmtime to 0.34.1 2022-02-17 13:07:07 +09:00
Taiki Endo
200308111f Update scripts 2022-02-17 13:06:46 +09:00
Taiki Endo
5df67a7818 Release 1.1.5 2022-02-08 12:17:51 +09:00
Taiki Endo
6a64a6dede Automate changelog update 2022-02-08 12:17:41 +09:00
Taiki Endo
6135833927 Update wasmtime to 0.34.0 2022-02-08 11:42:37 +09:00
Taiki Endo
fb7c739bcd Update URLs of cross 2022-02-06 23:11:33 +09:00
Taiki Endo
ff05552c79 Release 1.1.4 2022-02-06 23:07:42 +09:00
Taiki Endo
d037a2617d Update cargo-llvm-cov to 0.2.0 2022-02-06 23:05:04 +09:00
Taiki Endo
2e9722e984 Release 1.1.3 2022-02-06 10:03:50 +09:00
Taiki Endo
effa33c167 Update scripts 2022-02-06 10:00:55 +09:00
Taiki Endo
2e45a72791 Update cargo-minimal-versions to 0.1.3 2022-02-06 10:00:43 +09:00
6 changed files with 67 additions and 29 deletions

View File

@@ -25,9 +25,9 @@ jobs:
os:
- ubuntu-18.04
tool:
# NOTE: Specifying the version of valgrind and wasm-pack is not supported.
# Note: Specifying the version of valgrind and wasm-pack is not supported.
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,valgrind,wasm-pack,wasmtime
- cargo-hack@0.5.12,cargo-llvm-cov@0.1.16,cargo-minimal-versions@0.1.2,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2,wasmtime@0.33.0
- cargo-hack@0.5.12,cargo-llvm-cov@0.2.0,cargo-minimal-versions@0.1.3,parse-changelog@0.4.7,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2,wasmtime@0.34.0
include:
- os: macos-10.15
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt,wasm-pack,wasmtime

View File

@@ -10,6 +10,23 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased]
## [1.1.6] - 2022-02-20
- Update `cargo-llvm-cov@latest` to 0.2.1.
- Update `shfmt@latest` to 3.4.3.
## [1.1.5] - 2022-02-08
- Update `wasmtime@latest` to 0.34.0.
## [1.1.4] - 2022-02-06
- Update `cargo-llvm-cov@latest` to 0.2.0.
## [1.1.3] - 2022-02-06
- Update `cargo-minimal-versions@latest` to 0.1.3.
## [1.1.2] - 2022-01-21
- Update `cargo-hack@latest` to 0.5.12.
@@ -41,7 +58,11 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
Initial release
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.1.2...HEAD
[Unreleased]: https://github.com/taiki-e/install-action/compare/v1.1.6...HEAD
[1.1.6]: https://github.com/taiki-e/install-action/compare/v1.1.5...v1.1.6
[1.1.5]: https://github.com/taiki-e/install-action/compare/v1.1.4...v1.1.5
[1.1.4]: https://github.com/taiki-e/install-action/compare/v1.1.3...v1.1.4
[1.1.3]: https://github.com/taiki-e/install-action/compare/v1.1.2...v1.1.3
[1.1.2]: https://github.com/taiki-e/install-action/compare/v1.1.1...v1.1.2
[1.1.1]: https://github.com/taiki-e/install-action/compare/v1.1.0...v1.1.1
[1.1.0]: https://github.com/taiki-e/install-action/compare/v1.0.3...v1.1.0

View File

@@ -70,7 +70,7 @@ https://spdx.org/licenses
| [**cargo-llvm-cov**](https://github.com/taiki-e/cargo-llvm-cov) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-llvm-cov/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-llvm-cov/blob/HEAD/LICENSE-MIT) |
| [**cargo-minimal-versions**](https://github.com/taiki-e/cargo-minimal-versions) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/cargo-minimal-versions/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/cargo-minimal-versions/blob/HEAD/LICENSE-MIT) |
| [**parse-changelog**](https://github.com/taiki-e/parse-changelog) | `~/.cargo/bin` | [GitHub Releases](https://github.com/taiki-e/parse-changelog/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/taiki-e/parse-changelog/blob/HEAD/LICENSE-MIT) |
| [**cross**](https://github.com/rust-embedded/cross) | `~/.cargo/bin` | [GitHub Releases](https://github.com/rust-embedded/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/rust-embedded/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/rust-embedded/cross/blob/HEAD/LICENSE-MIT) |
| [**cross**](https://github.com/cross-rs/cross) | `~/.cargo/bin` | [GitHub Releases](https://github.com/cross-rs/cross/releases) | Linux, macOS, Windows | [Apache-2.0](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-APACHE) OR [MIT](https://github.com/cross-rs/cross/blob/HEAD/LICENSE-MIT) |
| [**shellcheck**](https://www.shellcheck.net) | `/usr/local/bin` | [GitHub Releases](https://github.com/koalaman/shellcheck/releases) | Linux, macOS | [GPL-3.0-or-later](https://github.com/koalaman/shellcheck/blob/HEAD/LICENSE) |
| [**shfmt**](https://github.com/mvdan/sh) | `/usr/local/bin` | [GitHub Releases](https://github.com/mvdan/sh/releases) | Linux, macOS | [BSD-3-Clause](https://github.com/mvdan/sh/blob/HEAD/LICENSE) |
| [**valgrind**](https://valgrind.org) | `/snap/bin` | [snap](https://snapcraft.io/install/valgrind/ubuntu) | Linux | [GPL-2.0-or-later](https://valgrind.org/docs/manual/license.gpl.html) |

12
main.sh
View File

@@ -59,9 +59,9 @@ for tool in "${tools[@]}"; do
# https://github.com/taiki-e/cargo-hack/releases
cargo-hack) latest_version="0.5.12" ;;
# https://github.com/taiki-e/cargo-llvm-cov/releases
cargo-llvm-cov) latest_version="0.1.16" ;;
cargo-llvm-cov) latest_version="0.2.1" ;;
# https://github.com/taiki-e/cargo-minimal-versions/releases
cargo-minimal-versions) latest_version="0.1.2" ;;
cargo-minimal-versions) latest_version="0.1.3" ;;
# https://github.com/taiki-e/parse-changelog/releases
parse-changelog) latest_version="0.4.7" ;;
*) exit 1 ;;
@@ -81,9 +81,9 @@ for tool in "${tools[@]}"; do
| tar xzf - -C ~/.cargo/bin
;;
cross)
# https://github.com/rust-embedded/cross/releases
# https://github.com/cross-rs/cross/releases
latest_version="0.2.1"
repo="rust-embedded/cross"
repo="cross-rs/cross"
case "${OSTYPE}" in
linux*) target="x86_64-unknown-linux-musl" ;;
darwin*) target="x86_64-apple-darwin" ;;
@@ -121,7 +121,7 @@ for tool in "${tools[@]}"; do
;;
shfmt)
# https://github.com/mvdan/sh/releases
latest_version="3.4.2"
latest_version="3.4.3"
repo="mvdan/sh"
case "${OSTYPE}" in
linux*) target="linux_amd64" ;;
@@ -164,7 +164,7 @@ for tool in "${tools[@]}"; do
;;
wasmtime)
# https://github.com/bytecodealliance/wasmtime/releases
latest_version="0.33.0"
latest_version="0.34.0"
repo="bytecodealliance/wasmtime"
case "${OSTYPE}" in
linux*) target="x86_64-linux" ;;

View File

@@ -1,17 +1,16 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..
# Publish a new release.
#
# USAGE:
# ./tools/publish.sh <VERSION>
#
# NOTE:
# Note:
# - This script requires parse-changelog <https://github.com/taiki-e/parse-changelog>
cd "$(cd "$(dirname "$0")" && pwd)"/..
bail() {
echo >&2 "error: $*"
exit 1
@@ -31,23 +30,42 @@ fi
git diff --exit-code
git diff --exit-code --staged
# Make sure the same release has not been created in the past.
if gh release view "${tag}" >/dev/null; then
bail "tag '${tag}' has already been created and pushed"
fi
# Make sure the same release does not exist in CHANGELOG.md.
release_date=$(date --utc '+%Y-%m-%d')
if grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then
bail "release ${version} already exist in CHANGELOG.md"
fi
if grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then
bail "link to ${version} already exist in CHANGELOG.md"
fi
# Update changelog.
remote_url=$(grep -E '^\[Unreleased\]: https://' CHANGELOG.md | sed 's/^\[Unreleased\]: //' | sed 's/\.\.\.HEAD$//')
before_tag=$(sed <<<"${remote_url}" 's/^.*\/compare\///')
remote_url=$(sed <<<"${remote_url}" 's/\/compare\/v.*$//')
sed -i "s/^## \\[Unreleased\\]/## [Unreleased]\\n\\n## [${version}] - ${release_date}/" CHANGELOG.md
sed -i "s#^\[Unreleased\]: https://.*#[Unreleased]: ${remote_url}/compare/v${version}...HEAD\\n[${version}]: ${remote_url}/compare/${before_tag}...v${version}#" CHANGELOG.md
if ! grep -Eq "^## \\[${version//./\\.}\\] - ${release_date}$" CHANGELOG.md; then
bail "failed to update CHANGELOG.md"
fi
if ! grep -Eq "^\\[${version//./\\.}\\]: " CHANGELOG.md; then
bail "failed to update CHANGELOG.md"
fi
# Make sure that a valid release note for this version exists.
# https://github.com/taiki-e/parse-changelog
echo "============== CHANGELOG =============="
parse-changelog CHANGELOG.md "${version}"
echo "======================================="
if ! grep <CHANGELOG.md -E "^## \\[${version//./\\.}\\] - $(date --utc '+%Y-%m-%d')$" >/dev/null; then
bail "not found section '[${version}] - $(date --utc '+%Y-%m-%d')' in CHANGELOG.md"
fi
if ! grep <CHANGELOG.md -E "^\\[${version//./\\.}\\]: " >/dev/null; then
bail "not found link to [${version}] in CHANGELOG.md"
fi
# Make sure the same release has not been created in the past.
if gh release view "${tag}" &>/dev/null; then
bail "tag '${tag}' has already been created and pushed"
fi
# Create a release commit.
git add CHANGELOG.md
git commit -m "Release ${version}"
tools=(
cargo-hack
@@ -72,7 +90,7 @@ tools=(
version_tag="v${version%%.*}"
git checkout -b "${version_tag}"
git push origin refs/heads/"${version_tag}"
if git --no-pager tag | grep -E "^${version_tag}$" &>/dev/null; then
if git --no-pager tag | grep -Eq "^${version_tag}$"; then
git tag -d "${version_tag}"
git push --delete origin refs/tags/"${version_tag}"
fi
@@ -90,7 +108,7 @@ for tool in "${tools[@]}"; do
git add action.yml
git commit -m "${tool}"
git push origin -f refs/heads/"${tool}"
if git --no-pager tag | grep -E "^${tool}$" &>/dev/null; then
if git --no-pager tag | grep -Eq "^${tool}$"; then
git tag -d "${tool}"
git push --delete origin refs/tags/"${tool}"
fi

View File

@@ -2,17 +2,16 @@
# shellcheck disable=SC2046
set -euo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..
# USAGE:
# ./tools/tidy.sh
#
# NOTE: This script requires the following tools:
# Note: This script requires the following tools:
# - shfmt
# - prettier
# - shellcheck
cd "$(cd "$(dirname "$0")" && pwd)"/..
x() {
local cmd="$1"
shift