mirror of https://github.com/rwf2/Rocket.git
Pass flags along in 'publish' script.
This commit is contained in:
parent
ef3e7ca2c6
commit
4b5000e33b
|
@ -19,6 +19,7 @@ Cargo.lock
|
||||||
|
|
||||||
# The upload script, for now.
|
# The upload script, for now.
|
||||||
scripts/upload-docs.sh
|
scripts/upload-docs.sh
|
||||||
|
scripts/redirect.html
|
||||||
|
|
||||||
# Backup files.
|
# Backup files.
|
||||||
*.bak
|
*.bak
|
||||||
|
|
|
@ -5,17 +5,10 @@ set -e
|
||||||
# Publishes the current versions of all Rocket crates to crates.io.
|
# Publishes the current versions of all Rocket crates to crates.io.
|
||||||
#
|
#
|
||||||
|
|
||||||
# FIXME: Check for FIXMEs before publishing!..?
|
|
||||||
|
|
||||||
# Brings in _ROOT, _DIR, _DIRS globals.
|
# Brings in _ROOT, _DIR, _DIRS globals.
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source "${SCRIPT_DIR}/config.sh"
|
source "${SCRIPT_DIR}/config.sh"
|
||||||
|
|
||||||
if ! [ -z "$(git status --porcelain)" ]; then
|
|
||||||
echo "There are uncommited changes! Aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
function strip_dev_dependencies() {
|
function strip_dev_dependencies() {
|
||||||
perl -i.bak -p0e 's/\[dev-dependencies\][^\[]*//smg' "${1}/Cargo.toml"
|
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"
|
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.
|
# Ensure everything passes before trying to publish.
|
||||||
echo ":::: Running test suite..."
|
echo ":::: Running test suite..."
|
||||||
cargo clean
|
cargo clean
|
||||||
|
@ -39,9 +37,9 @@ done
|
||||||
# Publish all the things.
|
# Publish all the things.
|
||||||
for dir in "${ALL_PROJECT_DIRS[@]}"; do
|
for dir in "${ALL_PROJECT_DIRS[@]}"; do
|
||||||
pushd "${dir}"
|
pushd "${dir}"
|
||||||
echo ":::: Publishing '${dir}..."
|
echo ":::: Publishing '${dir}'..."
|
||||||
# We already checked things ourselves. Don't spend time reverifying.
|
# We already checked things ourselves. Don't spend time reverifying.
|
||||||
cargo publish --no-verify --allow-dirty
|
cargo publish --no-verify --allow-dirty ${@:1}
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue