Skip to content

Commit

Permalink
rm braces on individually quoted variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Nov 24, 2023
1 parent 5ef33aa commit cb0c326
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ CARGO_PUBLISH_FLAGS=""

# Allow us to specify a crates.io API token via environment variables. Mostly
# for CI use.
if [ "${CRATES_TOKEN}" != "" ]; then
if [ "$CRATES_TOKEN" != "" ]; then
CARGO_PUBLISH_FLAGS="${CARGO_PUBLISH_FLAGS} --token ${CRATES_TOKEN}"
fi

Expand All @@ -66,7 +66,7 @@ check_version_online() {

publish() {
echo "Publishing crate $1..."
cargo publish --manifest-path "$(get_manifest_path "${1}")" ${CARGO_PUBLISH_FLAGS}
cargo publish --manifest-path "$(get_manifest_path "${1}")" "$CARGO_PUBLISH_FLAGS"
echo ""
}

Expand All @@ -75,11 +75,11 @@ wait_until_available() {
for retry in {1..5}; do
sleep 5
ONLINE_DATE="$(check_version_online "${1}" "${2}")"
if [ "${ONLINE_DATE}" != "" ]; then
if [ "$ONLINE_DATE" != "" ]; then
echo "Crate ${crate} is now available online"
break
else
if [ "${retry}" == 5 ]; then
if [ "$retry" == 5 ]; then
echo "ERROR: Crate should have become available by now"
exit 1
else
Expand All @@ -93,15 +93,15 @@ wait_until_available() {

echo "Attempting to publish crate(s): ${CRATES}"

for crate in ${CRATES}; do
VERSION="$(get_local_version "${crate}")"
ONLINE_DATE="$(check_version_online "${crate}" "${VERSION}")"
for crate in "$CRATES"; do
VERSION="$(get_local_version "$crate")"
ONLINE_DATE="$(check_version_online "$crate" "$VERSION")"
echo "${crate} version number: ${VERSION}"
if [ "${ONLINE_DATE}" != "" ]; then
if [ "$ONLINE_DATE" != "" ]; then
echo "${crate} ${VERSION} has already been published at ${ONLINE_DATE}, skipping"
continue
fi

publish "${crate}"
wait_until_available "${crate}" "${VERSION}"
publish "$crate"
wait_until_available "$crate" "$VERSION"
done

0 comments on commit cb0c326

Please sign in to comment.