mirror of
https://github.com/taiki-e/install-action.git
synced 2026-05-03 11:40:35 +00:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6959113efc | ||
|
|
86e5744719 | ||
|
|
c80c44ce16 | ||
|
|
1354305f72 | ||
|
|
8569da4c37 | ||
|
|
2d2c3d6d98 | ||
|
|
3b28924ced | ||
|
|
85a28581e5 | ||
|
|
f0b89cda51 | ||
|
|
9e5260f1db | ||
|
|
a4cdfee82b | ||
|
|
71bb81889c | ||
|
|
4f363552df | ||
|
|
60c0a46993 |
3
.github/.cspell/organization-dictionary.txt
vendored
3
.github/.cspell/organization-dictionary.txt
vendored
@@ -138,8 +138,11 @@ binutils
|
|||||||
connrefused
|
connrefused
|
||||||
cygwin
|
cygwin
|
||||||
dpkg
|
dpkg
|
||||||
|
elif
|
||||||
endianness
|
endianness
|
||||||
|
esac
|
||||||
euxo
|
euxo
|
||||||
|
gsub
|
||||||
msys
|
msys
|
||||||
noninteractive
|
noninteractive
|
||||||
noprofile
|
noprofile
|
||||||
|
|||||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -21,10 +21,11 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- uses: taiki-e/create-gh-release-action@v1
|
- uses: taiki-e/create-gh-release-action@v1
|
||||||
with:
|
with:
|
||||||
changelog: CHANGELOG.md
|
changelog: CHANGELOG.md
|
||||||
title: $version
|
title: $version
|
||||||
branch: 'main|v[0-9]+'
|
branch: 'main|v[0-9]+'
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- run: ci/publish.sh
|
|
||||||
|
|||||||
34
CHANGELOG.md
34
CHANGELOG.md
@@ -10,6 +10,32 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.6.17] - 2023-04-20
|
||||||
|
|
||||||
|
- Update `wasmtime@latest` to 8.0.0.
|
||||||
|
|
||||||
|
## [2.6.16] - 2023-04-18
|
||||||
|
|
||||||
|
- Update `cargo-llvm-cov@latest` to 0.5.16.
|
||||||
|
|
||||||
|
## [2.6.15] - 2023-04-18
|
||||||
|
|
||||||
|
- Update `dprint@latest` to 0.36.0.
|
||||||
|
|
||||||
|
## [2.6.14] - 2023-04-16
|
||||||
|
|
||||||
|
- Update `cargo-minimal-versions@latest` to 0.1.12.
|
||||||
|
|
||||||
|
- Update `cargo-llvm-cov@latest` to 0.5.15.
|
||||||
|
|
||||||
|
## [2.6.13] - 2023-04-13
|
||||||
|
|
||||||
|
- Update `protoc@latest` to 3.22.3.
|
||||||
|
|
||||||
|
## [2.6.12] - 2023-04-12
|
||||||
|
|
||||||
|
- Update `cargo-deny@latest` to 0.13.9.
|
||||||
|
|
||||||
## [2.6.11] - 2023-04-11
|
## [2.6.11] - 2023-04-11
|
||||||
|
|
||||||
- Update `dprint@latest` to 0.35.4.
|
- Update `dprint@latest` to 0.35.4.
|
||||||
@@ -723,7 +749,13 @@ Note: This release is considered a breaking change because installing on version
|
|||||||
|
|
||||||
Initial release
|
Initial release
|
||||||
|
|
||||||
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.6.11...HEAD
|
[Unreleased]: https://github.com/taiki-e/install-action/compare/v2.6.17...HEAD
|
||||||
|
[2.6.17]: https://github.com/taiki-e/install-action/compare/v2.6.16...v2.6.17
|
||||||
|
[2.6.16]: https://github.com/taiki-e/install-action/compare/v2.6.15...v2.6.16
|
||||||
|
[2.6.15]: https://github.com/taiki-e/install-action/compare/v2.6.14...v2.6.15
|
||||||
|
[2.6.14]: https://github.com/taiki-e/install-action/compare/v2.6.13...v2.6.14
|
||||||
|
[2.6.13]: https://github.com/taiki-e/install-action/compare/v2.6.12...v2.6.13
|
||||||
|
[2.6.12]: https://github.com/taiki-e/install-action/compare/v2.6.11...v2.6.12
|
||||||
[2.6.11]: https://github.com/taiki-e/install-action/compare/v2.6.10...v2.6.11
|
[2.6.11]: https://github.com/taiki-e/install-action/compare/v2.6.10...v2.6.11
|
||||||
[2.6.10]: https://github.com/taiki-e/install-action/compare/v2.6.9...v2.6.10
|
[2.6.10]: https://github.com/taiki-e/install-action/compare/v2.6.9...v2.6.10
|
||||||
[2.6.9]: https://github.com/taiki-e/install-action/compare/v2.6.8...v2.6.9
|
[2.6.9]: https://github.com/taiki-e/install-action/compare/v2.6.8...v2.6.9
|
||||||
|
|||||||
@@ -3,15 +3,6 @@ set -euxo pipefail
|
|||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
cd "$(dirname "$0")"/..
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
bail() {
|
|
||||||
echo >&2 "error: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -z "${CI:-}" ]]; then
|
|
||||||
bail "this script is intended to call from release workflow on CI"
|
|
||||||
fi
|
|
||||||
|
|
||||||
git config user.name "Taiki Endo"
|
git config user.name "Taiki Endo"
|
||||||
git config user.email "te316e89@gmail.com"
|
git config user.email "te316e89@gmail.com"
|
||||||
|
|
||||||
|
|||||||
@@ -1,74 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
IFS=$'\n\t'
|
|
||||||
cd "$(dirname "$0")"/..
|
|
||||||
|
|
||||||
# shellcheck disable=SC2154
|
|
||||||
trap 's=$?; echo >&2 "$0: Error on line "${LINENO}": ${BASH_COMMAND}"; exit ${s}' ERR
|
|
||||||
|
|
||||||
bail() {
|
|
||||||
echo >&2 "error: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -z "${CI:-}" ]]; then
|
|
||||||
bail "this script is intended to call from release workflow on CI"
|
|
||||||
fi
|
|
||||||
ref="${GITHUB_REF:-}"
|
|
||||||
if [[ "${ref}" != "refs/tags/"* ]]; then
|
|
||||||
bail "tag ref should start with 'refs/tags/'"
|
|
||||||
fi
|
|
||||||
tag="${ref#refs/tags/}"
|
|
||||||
|
|
||||||
git config user.name "Taiki Endo"
|
|
||||||
git config user.email "te316e89@gmail.com"
|
|
||||||
|
|
||||||
version="${tag}"
|
|
||||||
version="${version#v}"
|
|
||||||
|
|
||||||
tools=()
|
|
||||||
for tool in tools/codegen/base/*.json; do
|
|
||||||
tools+=("$(basename "${tool%.*}")")
|
|
||||||
done
|
|
||||||
# Aliases
|
|
||||||
tools+=(nextest)
|
|
||||||
# Not manifest-base
|
|
||||||
tools+=(valgrind)
|
|
||||||
|
|
||||||
(
|
|
||||||
set -x
|
|
||||||
|
|
||||||
major_version_tag="v${version%%.*}"
|
|
||||||
git checkout -b "${major_version_tag}"
|
|
||||||
git push origin refs/heads/"${major_version_tag}"
|
|
||||||
if git --no-pager tag | grep -Eq "^${major_version_tag}$"; then
|
|
||||||
git tag -d "${major_version_tag}"
|
|
||||||
git push --delete origin refs/tags/"${major_version_tag}"
|
|
||||||
fi
|
|
||||||
git tag "${major_version_tag}"
|
|
||||||
git checkout main
|
|
||||||
git branch -d "${major_version_tag}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for tool in "${tools[@]}"; do
|
|
||||||
(
|
|
||||||
set -x
|
|
||||||
git checkout -b "${tool}"
|
|
||||||
sed -i -e "s/required: true/required: false/g" action.yml
|
|
||||||
sed -i -e "s/# default: #publish:tool/default: ${tool}/g" action.yml
|
|
||||||
git add action.yml
|
|
||||||
git commit -m "${tool}"
|
|
||||||
git push origin -f refs/heads/"${tool}"
|
|
||||||
if git --no-pager tag | grep -Eq "^${tool}$"; then
|
|
||||||
git tag -d "${tool}"
|
|
||||||
git push --delete origin refs/tags/"${tool}"
|
|
||||||
fi
|
|
||||||
git tag "${tool}"
|
|
||||||
git checkout main
|
|
||||||
git branch -D "${tool}"
|
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
git push origin --tags
|
|
||||||
18
manifests/cargo-deny.json
generated
18
manifests/cargo-deny.json
generated
@@ -18,10 +18,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.13.8"
|
"version": "0.13.9"
|
||||||
},
|
},
|
||||||
"0.13": {
|
"0.13": {
|
||||||
"version": "0.13.8"
|
"version": "0.13.9"
|
||||||
|
},
|
||||||
|
"0.13.9": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "77f6b3feab12afc82638cd4c6197c983d249d1afa4180a6b9c933efbf8bff427"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "7b790f7e15dc6bb79dc0a737310f62fc7a4653749e40ec4fa7419ee627a014ed"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "6f6a69d1dbabf98a1d826dd2dbc0bbfd378336ec891b3e7fd8c570744ea6efa3"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "7d4cc49030262296c96076519deefc740e70fbc338ccd9179d4bc9d3be373512"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.13.8": {
|
"0.13.8": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
38
manifests/cargo-llvm-cov.json
generated
38
manifests/cargo-llvm-cov.json
generated
@@ -17,10 +17,44 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.5.14"
|
"version": "0.5.16"
|
||||||
},
|
},
|
||||||
"0.5": {
|
"0.5": {
|
||||||
"version": "0.5.14"
|
"version": "0.5.16"
|
||||||
|
},
|
||||||
|
"0.5.16": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "d7759f9d465907f4a8fa24f10bfa0817863f62c412ffaae7b8dadab370201f9b"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "67f720d403569e7fa69ed2ed74c90d06658dc713c0f1f60088f12af267db5c6b"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "d19af20d0e4688f2557024fe84c6eeaddf3e7abcb9fb45304a9d042dd155d1bd"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "f1055016db604f346d351d16fdb3ae43d7ab7ebc31e4463b836daa990b17c78f"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "db2780cf7af86b50ae011f49c4a91f2da58115ff47835a96dca134de2bd60c7e"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"0.5.15": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "407b0ddf85e6a39dfe5379761fc1074c7e79f7b518c732072bda1e4fc854d0fb"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "71c6d3010f8d08ab45b23e3459a751d4f8afeaa96f1537815f3cc9f96c4cbef6"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "8de32cdcb14a4ca1fabe5dae76761bfa73890fa070e935a4628f0ca8ac050759"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "93cae63fb000fbe327a0f5e8caf6507f9d6c9fdf6775c248968ad977411d8f51"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "6286e6e73bf505c67b23d47591f6f05e5f5feba809442a6a66d1b7ec3fc8a93b"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.5.14": {
|
"0.5.14": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
24
manifests/cargo-minimal-versions.json
generated
24
manifests/cargo-minimal-versions.json
generated
@@ -20,10 +20,30 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.1.11"
|
"version": "0.1.12"
|
||||||
},
|
},
|
||||||
"0.1": {
|
"0.1": {
|
||||||
"version": "0.1.11"
|
"version": "0.1.12"
|
||||||
|
},
|
||||||
|
"0.1.12": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "14d33bd273110fc3a4ebc96eab922442e2663f1c8d8da746d66a917fa2957297"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "d4a71d3e58f0d0a998f35a034120e831498a36601a02b940c7999030decb43be"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "ab17ab06b5f211611e88d17e4b28ff19076c5b9a6d351fd7f0d20a071f3a1d03"
|
||||||
|
},
|
||||||
|
"aarch64_linux_musl": {
|
||||||
|
"checksum": "f7aa0d7909f9b828446c9d5f2a0db0ff27df7c167f110609d665b4d70d8a1a8b"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "1f23174e8a4522799999bac4564d780b7d4893d9f5aa2472b71782e826e3acbd"
|
||||||
|
},
|
||||||
|
"aarch64_windows": {
|
||||||
|
"checksum": "62267707abf30cacd086bfa035de527d5227682288c9e2176e03de925bae9dd3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.1.11": {
|
"0.1.11": {
|
||||||
"x86_64_linux_musl": {
|
"x86_64_linux_musl": {
|
||||||
|
|||||||
22
manifests/dprint.json
generated
22
manifests/dprint.json
generated
@@ -20,7 +20,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "0.35.4"
|
"version": "0.36.0"
|
||||||
|
},
|
||||||
|
"0.36": {
|
||||||
|
"version": "0.36.0"
|
||||||
|
},
|
||||||
|
"0.36.0": {
|
||||||
|
"x86_64_linux_musl": {
|
||||||
|
"checksum": "fd5dfb6f63389413984166c05754274d2ac9685f2a54e80619b016d7f527ea17"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "c55f6410fb879e2fad53ee9599172c40ee9446c5e69c04abc123b3d8346e63e2"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "beb17dc24c4e847334f7b4d06400e4de5d7931827f64ea43c1eb2c08f3cb9410"
|
||||||
|
},
|
||||||
|
"aarch64_linux_gnu": {
|
||||||
|
"checksum": "eda55e333246c6c22dcf624f1e8d38fa154ca460e705dd3f819449ba369fef5d"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "9220f02afcf6c016156695d9cdf9914e47bab8e8a29678d39f27387080940be7"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"0.35": {
|
"0.35": {
|
||||||
"version": "0.35.4"
|
"version": "0.35.4"
|
||||||
|
|||||||
28
manifests/protoc.json
generated
28
manifests/protoc.json
generated
@@ -1,13 +1,35 @@
|
|||||||
{
|
{
|
||||||
"template": null,
|
"template": null,
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "3.22.2"
|
"version": "3.22.3"
|
||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"version": "3.22.2"
|
"version": "3.22.3"
|
||||||
},
|
},
|
||||||
"3.22": {
|
"3.22": {
|
||||||
"version": "3.22.2"
|
"version": "3.22.3"
|
||||||
|
},
|
||||||
|
"3.22.3": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-x86_64.zip",
|
||||||
|
"checksum": "0f8070d762eb8a2f5a13a47713a553f989f9d9b556e7e3ebfa2bd6464e2ecaeb"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-osx-x86_64.zip",
|
||||||
|
"checksum": "d644a65064a97fa3ed033a4a2314ab35816abbd9aed052f9b1b3374d2deaaae4"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-win64.zip",
|
||||||
|
"checksum": "fa7fe21bf6e204a4e1eec3ffee1d53c84e216289bc4762e072258e5bca113a3c"
|
||||||
|
},
|
||||||
|
"aarch64_linux_gnu": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-linux-aarch_64.zip",
|
||||||
|
"checksum": "c6068d9d151c39723bc7db920759b55737a770b0c2ec544dd0197d4078d7a956"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"url": "https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protoc-22.3-osx-aarch_64.zip",
|
||||||
|
"checksum": "79cc15d1b528061ea0a818b0abcf3be1e0bdcb063a0cc999af27974cccdc5cce"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"3.22.2": {
|
"3.22.2": {
|
||||||
"x86_64_linux_gnu": {
|
"x86_64_linux_gnu": {
|
||||||
|
|||||||
25
manifests/wasmtime.json
generated
25
manifests/wasmtime.json
generated
@@ -22,7 +22,30 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"latest": {
|
"latest": {
|
||||||
"version": "7.0.0"
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"8": {
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"8.0": {
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"8.0.0": {
|
||||||
|
"x86_64_linux_gnu": {
|
||||||
|
"checksum": "0ba34842bbac8896dbdd860173b2c554d93d63ecc490f725fe3331db913714ad"
|
||||||
|
},
|
||||||
|
"x86_64_macos": {
|
||||||
|
"checksum": "7748306b9be4d37e76d6df7e2d8b9b84bdcc62d9f3a642d008184075e4f10018"
|
||||||
|
},
|
||||||
|
"x86_64_windows": {
|
||||||
|
"checksum": "28171dc028abd209e3d46c6aa5d230f89f0213b756a6e276a98538bbe3d3b9a8"
|
||||||
|
},
|
||||||
|
"aarch64_linux_gnu": {
|
||||||
|
"checksum": "d2025860565caa24d39003b3c65dc9391248caeb7d586b3885ec2cc11a158bab"
|
||||||
|
},
|
||||||
|
"aarch64_macos": {
|
||||||
|
"checksum": "8d600ea89e0e7290763a17360daf2afec3a9fbfd774cd343a2b2f730fdcb34e3"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"7": {
|
"7": {
|
||||||
"version": "7.0.0"
|
"version": "7.0.0"
|
||||||
|
|||||||
@@ -14,14 +14,6 @@ trap 's=$?; echo >&2 "$0: Error on line "${LINENO}": ${BASH_COMMAND}"; exit ${s}
|
|||||||
# Note: This script requires the following tools:
|
# Note: This script requires the following tools:
|
||||||
# - parse-changelog <https://github.com/taiki-e/parse-changelog>
|
# - parse-changelog <https://github.com/taiki-e/parse-changelog>
|
||||||
|
|
||||||
x() {
|
|
||||||
local cmd="$1"
|
|
||||||
shift
|
|
||||||
(
|
|
||||||
set -x
|
|
||||||
"${cmd}" "$@"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
bail() {
|
bail() {
|
||||||
echo >&2 "error: $*"
|
echo >&2 "error: $*"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -48,7 +40,6 @@ if gh release view "${tag}" &>/dev/null; then
|
|||||||
bail "tag '${tag}' has already been created and pushed"
|
bail "tag '${tag}' has already been created and pushed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Make sure that the release was created from an allowed branch.
|
|
||||||
if ! git branch | grep -q '\* main$'; then
|
if ! git branch | grep -q '\* main$'; then
|
||||||
bail "current branch is not 'main'"
|
bail "current branch is not 'main'"
|
||||||
fi
|
fi
|
||||||
@@ -97,11 +88,57 @@ echo "======================================="
|
|||||||
|
|
||||||
if [[ -n "${tags}" ]]; then
|
if [[ -n "${tags}" ]]; then
|
||||||
# Create a release commit.
|
# Create a release commit.
|
||||||
x git add "${changelog}"
|
git add "${changelog}"
|
||||||
x git commit -m "Release ${version}"
|
git commit -m "Release ${version}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
x git tag "${tag}"
|
tools=()
|
||||||
# TODO: the following still assumes admin permissions
|
for tool in tools/codegen/base/*.json; do
|
||||||
x git push origin main
|
tools+=("$(basename "${tool%.*}")")
|
||||||
x git push origin --tags
|
done
|
||||||
|
# Aliases
|
||||||
|
tools+=(nextest)
|
||||||
|
# Not manifest-base
|
||||||
|
tools+=(valgrind)
|
||||||
|
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
|
||||||
|
git tag "${tag}"
|
||||||
|
git push origin main
|
||||||
|
git push origin --tags
|
||||||
|
|
||||||
|
major_version_tag="v${version%%.*}"
|
||||||
|
git checkout -b "${major_version_tag}"
|
||||||
|
git push origin refs/heads/"${major_version_tag}"
|
||||||
|
if git --no-pager tag | grep -Eq "^${major_version_tag}$"; then
|
||||||
|
git tag -d "${major_version_tag}"
|
||||||
|
git push --delete origin refs/tags/"${major_version_tag}"
|
||||||
|
fi
|
||||||
|
git tag "${major_version_tag}"
|
||||||
|
git checkout main
|
||||||
|
git branch -d "${major_version_tag}"
|
||||||
|
)
|
||||||
|
|
||||||
|
for tool in "${tools[@]}"; do
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
git checkout -b "${tool}"
|
||||||
|
sed -i -e "s/required: true/required: false/g" action.yml
|
||||||
|
sed -i -e "s/# default: #publish:tool/default: ${tool}/g" action.yml
|
||||||
|
git add action.yml
|
||||||
|
git commit -m "${tool}"
|
||||||
|
git push origin -f refs/heads/"${tool}"
|
||||||
|
if git --no-pager tag | grep -Eq "^${tool}$"; then
|
||||||
|
git tag -d "${tool}"
|
||||||
|
git push --delete origin refs/tags/"${tool}"
|
||||||
|
fi
|
||||||
|
git tag "${tool}"
|
||||||
|
git checkout main
|
||||||
|
git branch -D "${tool}"
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
git push origin --tags
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ fi
|
|||||||
|
|
||||||
# Rust (if exists)
|
# Rust (if exists)
|
||||||
if [[ -n "$(git ls-files '*.rs')" ]]; then
|
if [[ -n "$(git ls-files '*.rs')" ]]; then
|
||||||
|
info "checking Rust code style"
|
||||||
if type -P rustup &>/dev/null; then
|
if type -P rustup &>/dev/null; then
|
||||||
# `cargo fmt` cannot recognize files not included in the current workspace and modules
|
# `cargo fmt` cannot recognize files not included in the current workspace and modules
|
||||||
# defined inside macros, so run rustfmt directly.
|
# defined inside macros, so run rustfmt directly.
|
||||||
@@ -87,10 +88,35 @@ if [[ -n "$(git ls-files '*.rs')" ]]; then
|
|||||||
error "please replace \`.cast()\` with \`.cast::<type_name>()\`:"
|
error "please replace \`.cast()\` with \`.cast::<type_name>()\`:"
|
||||||
echo "${cast_without_turbofish}"
|
echo "${cast_without_turbofish}"
|
||||||
fi
|
fi
|
||||||
|
first='1'
|
||||||
|
for readme in $(git ls-files '*README.md'); do
|
||||||
|
if ! grep -q '^<!-- tidy:crate-doc:start -->' "${readme}"; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
lib="$(dirname "${readme}")/src/lib.rs"
|
||||||
|
if [[ -n "${first}" ]]; then
|
||||||
|
first=''
|
||||||
|
info "checking readme and crate-level doc are synchronized"
|
||||||
|
fi
|
||||||
|
if ! grep -q '^<!-- tidy:crate-doc:end -->' "${readme}"; then
|
||||||
|
bail "missing '<!-- tidy:crate-doc:end -->' comment in ${readme}"
|
||||||
|
fi
|
||||||
|
if ! grep -q '^<!-- tidy:crate-doc:start -->' "${lib}"; then
|
||||||
|
bail "missing '<!-- tidy:crate-doc:start -->' comment in ${lib}"
|
||||||
|
fi
|
||||||
|
if ! grep -q '^<!-- tidy:crate-doc:end -->' "${lib}"; then
|
||||||
|
bail "missing '<!-- tidy:crate-doc:end -->' comment in ${lib}"
|
||||||
|
fi
|
||||||
|
new=$(tr <"${readme}" '\n' '\a' | grep -o '<!-- tidy:crate-doc:start -->.*<!-- tidy:crate-doc:end -->' | sed 's/\&/\\\&/g; s/\\/\\\\/g')
|
||||||
|
new=$(tr <"${lib}" '\n' '\a' | awk -v new="${new}" 'gsub("<!-- tidy:crate-doc:start -->.*<!-- tidy:crate-doc:end -->",new)' | tr '\a' '\n')
|
||||||
|
echo "${new}" >"${lib}"
|
||||||
|
check_diff "${lib}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# C/C++ (if exists)
|
# C/C++ (if exists)
|
||||||
if [[ -n "$(git ls-files '*.c')$(git ls-files '*.cpp')" ]]; then
|
if [[ -n "$(git ls-files '*.c')$(git ls-files '*.cpp')" ]]; then
|
||||||
|
info "checking C/C++ code style"
|
||||||
if [[ ! -e .clang-format ]]; then
|
if [[ ! -e .clang-format ]]; then
|
||||||
warn "could not fount .clang-format in the repository root"
|
warn "could not fount .clang-format in the repository root"
|
||||||
fi
|
fi
|
||||||
@@ -105,6 +131,7 @@ fi
|
|||||||
|
|
||||||
# YAML/JavaScript/JSON (if exists)
|
# YAML/JavaScript/JSON (if exists)
|
||||||
if [[ -n "$(git ls-files '*.yml')$(git ls-files '*.js')$(git ls-files '*.json')" ]]; then
|
if [[ -n "$(git ls-files '*.yml')$(git ls-files '*.js')$(git ls-files '*.json')" ]]; then
|
||||||
|
info "checking YAML/JavaScript/JSON code style"
|
||||||
if type -P npm &>/dev/null; then
|
if type -P npm &>/dev/null; then
|
||||||
echo "+ npx prettier -l -w \$(git ls-files '*.yml') \$(git ls-files '*.js') \$(git ls-files '*.json')"
|
echo "+ npx prettier -l -w \$(git ls-files '*.yml') \$(git ls-files '*.js') \$(git ls-files '*.json')"
|
||||||
npx prettier -l -w $(git ls-files '*.yml') $(git ls-files '*.js') $(git ls-files '*.json')
|
npx prettier -l -w $(git ls-files '*.yml') $(git ls-files '*.js') $(git ls-files '*.json')
|
||||||
@@ -114,6 +141,7 @@ if [[ -n "$(git ls-files '*.yml')$(git ls-files '*.js')$(git ls-files '*.json')"
|
|||||||
fi
|
fi
|
||||||
# Check GitHub workflows.
|
# Check GitHub workflows.
|
||||||
if [[ -d .github/workflows ]]; then
|
if [[ -d .github/workflows ]]; then
|
||||||
|
info "checking GitHub workflows"
|
||||||
if type -P jq &>/dev/null && type -P yq &>/dev/null; then
|
if type -P jq &>/dev/null && type -P yq &>/dev/null; then
|
||||||
for workflow in .github/workflows/*.yml; do
|
for workflow in .github/workflows/*.yml; do
|
||||||
# The top-level permissions must be weak as they are referenced by all jobs.
|
# The top-level permissions must be weak as they are referenced by all jobs.
|
||||||
@@ -149,6 +177,7 @@ if [[ -n "$(git ls-files '*.yaml')" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Shell scripts
|
# Shell scripts
|
||||||
|
info "checking Shell scripts"
|
||||||
if type -P shfmt &>/dev/null; then
|
if type -P shfmt &>/dev/null; then
|
||||||
echo "+ shfmt -l -w \$(git ls-files '*.sh')"
|
echo "+ shfmt -l -w \$(git ls-files '*.sh')"
|
||||||
shfmt -l -w $(git ls-files '*.sh')
|
shfmt -l -w $(git ls-files '*.sh')
|
||||||
@@ -174,6 +203,7 @@ fi
|
|||||||
|
|
||||||
# Spell check (if config exists)
|
# Spell check (if config exists)
|
||||||
if [[ -f .cspell.json ]]; then
|
if [[ -f .cspell.json ]]; then
|
||||||
|
info "spell checking"
|
||||||
if type -P npm &>/dev/null; then
|
if type -P npm &>/dev/null; then
|
||||||
has_rust=''
|
has_rust=''
|
||||||
if [[ -n "$(git ls-files '*Cargo.toml')" ]]; then
|
if [[ -n "$(git ls-files '*Cargo.toml')" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user