Files
install-action/tools/manifest.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
889 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2023-06-05 22:58:32 +09:00
# SPDX-License-Identifier: Apache-2.0 OR MIT
set -CeEuo pipefail
2022-12-24 21:49:18 +09:00
IFS=$'\n\t'
trap -- 's=$?; printf >&2 "%s\n" "${0##*/}:${LINENO}: \`${BASH_COMMAND}\` exit with ${s}"; exit ${s}' ERR
cd -- "$(dirname -- "$0")"/..
2022-12-24 21:49:18 +09:00
# Update manifests
#
# USAGE:
# ./tools/manifest.sh [PACKAGE [VERSION_REQ]]
# ./tools/manifest.sh full
if [[ $# -eq 1 ]] && [[ "$1" == "full" ]]; then
for manifest in tools/codegen/base/*.json; do
package="${manifest##*/}"
package="${package%.*}"
cargo run --manifest-path tools/codegen/Cargo.toml --release -- "${package}"
done
fi
2022-12-24 21:49:18 +09:00
if [[ $# -gt 0 ]]; then
cargo run --manifest-path tools/codegen/Cargo.toml --release -- "$@"
2022-12-24 21:49:18 +09:00
exit 0
fi
for manifest in tools/codegen/base/*.json; do
package="${manifest##*/}"
package="${package%.*}"
cargo run --manifest-path tools/codegen/Cargo.toml --release -- "${package}" latest
2022-12-24 21:49:18 +09:00
done