diff --git a/core/lib/src/lib.rs b/core/lib/src/lib.rs index 4b3248c6..4d04b4f6 100644 --- a/core/lib/src/lib.rs +++ b/core/lib/src/lib.rs @@ -93,10 +93,7 @@ //! [testing chapter of the guide]: https://rocket.rs/v0.5/guide/testing/#testing #[allow(unused_imports)] #[macro_use] extern crate rocket_codegen; -// FIXME(rustdoc): We should be able to doc(inline) and not doc the -// rocket_codegen crate at all. Alas, doc-inlining will currently 1) show hidden -// proc-macros, and 2) result in proc-macros pointing to the wrong docs. -#[doc(hidden)] pub use rocket_codegen::*; +pub use rocket_codegen::*; #[macro_use] extern crate log; #[macro_use] extern crate pear; diff --git a/scripts/config.sh b/scripts/config.sh index 612930e5..3eae8313 100755 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -23,15 +23,32 @@ function relative() { fi } +function future_date() { + local days_in_future=`[[ -z "$1" ]] && echo "0" || echo "$1"` + if date -v+1d +%Y-%m-%d > /dev/null 2>&1; then + echo $(date -v+${days_in_future}d +%Y-%m-%d) + elif date -d "+1 day" > /dev/null 2>&1; then + echo $(date '+%Y-%m-%d' -d "+${days_in_future} days") + else + echo "Error: need a 'date' cmd that accepts -v (BSD) or -d (GNU)" + exit 1 + fi +} + # Versioning information. These are toggled as versions change. -ROCKET_VERSION="0.5.0-dev" CURRENT_RELEASE=false PRE_RELEASE=true # A generated codename for this version. Use the git branch for pre-releases. case $PRE_RELEASE in - true) VERSION_CODENAME="$(git branch --show-current)" ;; - false) VERSION_CODENAME="$(echo "${ROCKET_VERSION}" | cut -d'.' -f1-2)" ;; + true) + VERSION_CODENAME="$(git branch --show-current)" + ROCKET_VERSION="${VERSION_CODENAME}-$(future_date)" + ;; + false) + ROCKET_VERSION="0.5.0-dev" + VERSION_CODENAME="$(echo "${ROCKET_VERSION}" | cut -d'.' -f1-2)" + ;; esac # Root of workspace-like directories. @@ -77,4 +94,5 @@ if [ "${1}" = "-p" ]; then echo "EXAMPLES_DIR: ${EXAMPLES_DIR}" echo "DOC_DIR: ${DOC_DIR}" echo "ALL_PROJECT_DIRS: ${ALL_PROJECT_DIRS[*]}" + echo "date(): $(future_date)" fi diff --git a/scripts/mk-docs.sh b/scripts/mk-docs.sh index 306b6b83..6fe39768 100755 --- a/scripts/mk-docs.sh +++ b/scripts/mk-docs.sh @@ -20,7 +20,7 @@ fi echo ":::: Generating the docs..." pushd "${PROJECT_ROOT}" > /dev/null 2>&1 RUSTDOCFLAGS="-Z unstable-options --crate-version ${ROCKET_VERSION}" \ - cargo doc -p rocket -p rocket_contrib -p rocket_codegen --no-deps --all-features + cargo doc -p rocket -p rocket_contrib --no-deps --all-features popd > /dev/null 2>&1 # Blank index, for redirection. diff --git a/scripts/test.sh b/scripts/test.sh index 4b2d8f36..0fe9f565 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -41,7 +41,6 @@ function ensure_tab_free() { # Ensures there are no files with trailing whitespace. function ensure_trailing_whitespace_free() { - # FIXME: Some .stderr files contain trailing spaces local matches=$(git grep -E -I "\s+$" "${PROJECT_ROOT}" | grep -v -F '.stderr:') if ! [ -z "${matches}" ]; then echo "Trailing whitespace was found in the following:"