From 789ee9f13863c7e9ebfe586db954142c57fba0d4 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Mon, 7 Jan 2019 20:56:46 -0800 Subject: [PATCH] package or publish. Also package on branch builds --- ci/publish-crate.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/publish-crate.sh b/ci/publish-crate.sh index 5b613a032..d56f95d17 100755 --- a/ci/publish-crate.sh +++ b/ci/publish-crate.sh @@ -26,16 +26,14 @@ CRATES=( ) -maybePackage="echo Package skipped" -maybePublish="echo Publish skipped" +cargoCommand="cargo package" # Only package/publish if this is a tagged release if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then - maybePackage="cargo package" # Only publish if there's no human around if [[ -n $CI ]]; then - maybePublish="cargo publish --token $CRATES_IO_TOKEN" + cargoCommand="cargo publish --token $CRATES_IO_TOKEN" if [[ -z "$CRATES_IO_TOKEN" ]]; then echo CRATES_IO_TOKEN undefined exit 1 @@ -52,7 +50,7 @@ for crate in "${CRATES[@]}"; do # TODO: Ensure the published version matches the contents of BUILDKITE_TAG ( set -x - ci/docker-run.sh rust bash -exc "cd $crate; $maybePackage; $maybePublish" + ci/docker-run.sh rust bash -exc "cd $crate; $cargoCommand" ) done