Rocket

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4b5000e33bb3d7877972006c3c100aa6aa564738
parent ef3e7ca2c609cf8b1db338a5126f388dbe787381
Author: Sergio Benitez <sb@sergio.bz>
Date:   Mon, 29 Oct 2018 04:55:18 -0700

Pass flags along in 'publish' script.

Diffstat:
M.gitignore | 1+
Mscripts/publish.sh | 16+++++++---------
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -19,6 +19,7 @@ Cargo.lock # The upload script, for now. scripts/upload-docs.sh +scripts/redirect.html # Backup files. *.bak diff --git a/scripts/publish.sh b/scripts/publish.sh @@ -5,17 +5,10 @@ set -e # Publishes the current versions of all Rocket crates to crates.io. # -# FIXME: Check for FIXMEs before publishing!..? - # Brings in _ROOT, _DIR, _DIRS globals. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${SCRIPT_DIR}/config.sh" -if ! [ -z "$(git status --porcelain)" ]; then - echo "There are uncommited changes! Aborting." - exit 1 -fi - function strip_dev_dependencies() { perl -i.bak -p0e 's/\[dev-dependencies\][^\[]*//smg' "${1}/Cargo.toml" } @@ -24,6 +17,11 @@ function restore_dev_dependencies() { mv "${1}/Cargo.toml.bak" "${1}/Cargo.toml" } +if ! [ -z "$(git status --porcelain)" ]; then + echo "There are uncommited changes! Aborting." + exit 1 +fi + # Ensure everything passes before trying to publish. echo ":::: Running test suite..." cargo clean @@ -39,9 +37,9 @@ done # Publish all the things. for dir in "${ALL_PROJECT_DIRS[@]}"; do pushd "${dir}" - echo ":::: Publishing '${dir}..." + echo ":::: Publishing '${dir}'..." # We already checked things ourselves. Don't spend time reverifying. - cargo publish --no-verify --allow-dirty + cargo publish --no-verify --allow-dirty ${@:1} popd done