mirror of https://github.com/rwf2/Rocket.git
Make new contrib libraries publishable.
This commit is contained in:
parent
fe16d11581
commit
394982edbd
|
@ -23,6 +23,7 @@ notify = "4.0.6"
|
|||
normpath = "0.3"
|
||||
|
||||
[dependencies.rocket]
|
||||
version = "0.5.0-dev"
|
||||
path = "../../core/lib"
|
||||
default-features = false
|
||||
|
||||
|
|
|
@ -34,9 +34,11 @@ memcache = { version = "0.15", optional = true }
|
|||
r2d2-memcache = { version = "0.6", optional = true }
|
||||
|
||||
[dependencies.rocket_sync_db_pools_codegen]
|
||||
version = "0.1.0-dev"
|
||||
path = "../codegen"
|
||||
|
||||
[dependencies.rocket]
|
||||
version = "0.5.0-dev"
|
||||
path = "../../../core/lib"
|
||||
default-features = false
|
||||
|
||||
|
|
|
@ -73,14 +73,23 @@ case $PRE_RELEASE in
|
|||
;;
|
||||
esac
|
||||
|
||||
ALL_PROJECT_DIRS=(
|
||||
CORE_CRATE_ROOTS=(
|
||||
"${CORE_HTTP_ROOT}"
|
||||
"${CORE_CODEGEN_ROOT}"
|
||||
"${CORE_LIB_ROOT}"
|
||||
)
|
||||
|
||||
CONTRIB_LIB_DIRS=(
|
||||
"${CONTRIB_ROOT}/sync_db_pools"
|
||||
CONTRIB_SYNC_DB_POOLS_CRATE_ROOTS=(
|
||||
"${CONTRIB_ROOT}/sync_db_pools/lib"
|
||||
"${CONTRIB_ROOT}/sync_db_pools/codegen"
|
||||
)
|
||||
|
||||
ALL_CRATE_ROOTS=(
|
||||
"${CORE_HTTP_ROOT}"
|
||||
"${CORE_CODEGEN_ROOT}"
|
||||
"${CORE_LIB_ROOT}"
|
||||
"${CONTRIB_ROOT}/sync_db_pools/lib"
|
||||
"${CONTRIB_ROOT}/sync_db_pools/codegen"
|
||||
"${CONTRIB_ROOT}/dyn_templates"
|
||||
)
|
||||
|
||||
|
@ -103,8 +112,7 @@ function print_environment() {
|
|||
echo " GUIDE_TESTS_ROOT: ${GUIDE_TESTS_ROOT}"
|
||||
echo " EXAMPLES_DIR: ${EXAMPLES_DIR}"
|
||||
echo " DOC_DIR: ${DOC_DIR}"
|
||||
echo " ALL_PROJECT_DIRS: ${ALL_PROJECT_DIRS[*]}"
|
||||
echo " CONTRIB_LIB_DIRS: ${CONTRIB_LIB_DIRS[*]}"
|
||||
echo " ALL_CRATE_ROOTS: ${ALL_CRATE_ROOTS[*]}"
|
||||
echo " date(): $(future_date)"
|
||||
}
|
||||
|
||||
|
|
|
@ -30,21 +30,23 @@ bash "${SCRIPT_DIR}/test.sh" +stable --all --release
|
|||
|
||||
# Temporarily remove dev-dependencies so crates.io verifies.
|
||||
echo ":::: Stripping [dev-dependencies]..."
|
||||
for dir in "${ALL_PROJECT_DIRS[@]}"; do
|
||||
for dir in "${ALL_CRATE_ROOTS[@]}"; do
|
||||
strip_dev_dependencies "${dir}"
|
||||
done
|
||||
|
||||
# Publish all the things.
|
||||
for dir in "${ALL_PROJECT_DIRS[@]}"; do
|
||||
for dir in "${ALL_CRATE_ROOTS[@]}"; do
|
||||
pushd "${dir}"
|
||||
echo ":::: Publishing '${dir}'..."
|
||||
# We already checked things ourselves. Don't spend time reverifying.
|
||||
cargo publish --no-verify --allow-dirty ${@:1}
|
||||
# Give the index some time to update so the deps are there if we need them.
|
||||
sleep 5
|
||||
popd
|
||||
done
|
||||
|
||||
# Restore dev-dependencies.
|
||||
echo ":::: Restoring [dev-dependencies]..."
|
||||
for dir in "${ALL_PROJECT_DIRS[@]}"; do
|
||||
for dir in "${ALL_CRATE_ROOTS[@]}"; do
|
||||
restore_dev_dependencies "${dir}"
|
||||
done
|
||||
|
|
|
@ -161,8 +161,11 @@ print_environment
|
|||
echo " CARGO: $CARGO"
|
||||
echo " EXTRA FLAGS: $@"
|
||||
|
||||
echo ":: Ensuring all crate versions match..."
|
||||
check_versions_match "${ALL_PROJECT_DIRS[@]}"
|
||||
echo ":: Ensuring core crate versions match..."
|
||||
check_versions_match "${CORE_CRATE_ROOTS[@]}"
|
||||
|
||||
echo ":: Ensuring contrib sync_db_pools versions match..."
|
||||
check_versions_match "${CONTRIB_SYNC_DB_POOLS_CRATE_ROOTS[@]}"
|
||||
|
||||
echo ":: Ensuring minimum style requirements are met..."
|
||||
check_style
|
||||
|
|
Loading…
Reference in New Issue