Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
```bash pkg="$1" oldver="$2" newver="$3" function usage() { printf "USAGE: %s PKG OLDVER NEWVER\n" "$0" } if [ -z "$pkg" ] || [ -z "$oldver" ] || [ -z "$newver" ]; then usage; exit 1; fi set -ex cd "$(git rev-parse --show-toplevel)" pwd pushd "released/packages/coq-${pkg}" oldopam="coq-${pkg}.${oldver}/opam" newopam="coq-${pkg}.${newver}/opam" mkdir -p "coq-${pkg}.${newver}" cp -f "$oldopam" "$newopam" git add "$newopam" sed -i "s/${oldver}/${newver}/g" "$newopam" url="$(grep -o '^\s*src: .*' "$newopam" | grep -o '"[^"]*"' | tr -d '"')" wget "$url" -O "$newver.tar.gz" sha512="$(sha512sum "$newver.tar.gz" | cut -d' ' -f1)" sed -i 's/\(checksum:[^"]*"\)[^"]*\("\)/\1sha512='"${sha512}"'\2/g' "$newopam" git diff "$newopam" git add "$newopam" ``` ``` ./release-next.sh rewriter 0.0.11 0.0.12 ```
- Loading branch information