-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
853: Prepare for the next release r=taiki-e a=taiki-e - crossbeam-utils 0.8.9 -> 0.8.10 - Fix unsoundness of `AtomicCell` on types containing niches. (#834) This fix contains breaking changes, but they are allowed because this is a soundness bug fix. See #834 for more. Co-authored-by: Taiki Endo <te316e89@gmail.com>
- Loading branch information
Showing
5 changed files
with
66 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
cd "$(dirname "$0")"/.. | ||
|
||
# Publish a new release. | ||
# | ||
# USAGE: | ||
# ./tools/publish.sh <CRATE> <VERSION> | ||
|
||
bail() { | ||
echo >&2 "error: $*" | ||
exit 1 | ||
} | ||
|
||
crate="${1:?}" | ||
version="${2:?}" | ||
version="${version#v}" | ||
tag="${crate}-${version}" | ||
if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z\.-]+)?(\+[0-9A-Za-z\.-]+)?$ ]]; then | ||
bail "invalid version format '${version}'" | ||
fi | ||
if [[ $# -gt 2 ]]; then | ||
bail "invalid argument '$3'" | ||
fi | ||
|
||
# Make sure there is no uncommitted change. | ||
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 | ||
|
||
if ! git branch | grep -q '\* master'; then | ||
bail "current branch is not 'master'" | ||
fi | ||
|
||
git tag "${tag}" | ||
|
||
( | ||
if [[ "${crate}" != "crossbeam" ]]; then | ||
cd "${crate}" | ||
fi | ||
cargo publish | ||
) | ||
|
||
git push origin --tags |