From eac30291f001cf84dfd4f09aa02d30fa0179ed1b Mon Sep 17 00:00:00 2001 From: Antonin Hildebrand Date: Tue, 17 Sep 2019 20:15:00 +0200 Subject: [PATCH] scripts: teach update-version.sh to update example projects as well --- scripts/_config.sh | 2 ++ scripts/update-versions.sh | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/_config.sh b/scripts/_config.sh index 18159a68d7..f5119eb4e3 100755 --- a/scripts/_config.sh +++ b/scripts/_config.sh @@ -78,5 +78,7 @@ DOCKER_TESTS_DIR="$ROOT/test/docker" ROOT_TMP_DIR_RELATIVE=".tmp" ROOT_TMP_DIR="$ROOT/$ROOT_TMP_DIR_RELATIVE" TRAVIS_CHROMEDRIVER_VERSION=${TRAVIS_CHROMEDRIVER_VERSION:-VIA_CHROMIUM_DOWNLOAD_URL} +EXAMPLES_LEININGEN_PROJECT_FILE="examples/leiningen/project.clj" +EXAMPLES_FIGMAIN_DEPS_FILE="examples/figwheel-main/deps.edn" popd diff --git a/scripts/update-versions.sh b/scripts/update-versions.sh index 30db7b591a..33117a86a3 100755 --- a/scripts/update-versions.sh +++ b/scripts/update-versions.sh @@ -5,13 +5,12 @@ source "$(dirname "${BASH_SOURCE[0]}")/_config.sh" false && source _config.sh # never executes, this is here just for IntelliJ Bash support to understand our sourcing -pushd "$ROOT" +cd "$ROOT" VERSION=$1 if [[ -z "$VERSION" ]]; then echo "please specify version as the first argument" - popd exit 1 fi @@ -19,8 +18,8 @@ sed -i "" -e "s/defproject binaryage\/dirac \".*\"/defproject binaryage\/dirac \ sed -i "" -e "s/def version \".*\"/def version \"$VERSION\"/g" "$PROJECT_VERSION_FILE" sed -i "" -e "s/\"version\"\: \".*\"/\"version\": \"$VERSION\"/g" "$UNPACKED_MANIFEST_FILE" sed -i "" -e "s/\"version\"\: \".*\"/\"version\": \"$VERSION\"/g" "$RELEASE_MANIFEST_FILE" +sed -i "" -e "s/dirac-version \".*\"/dirac-version \"$VERSION\"/g" "$EXAMPLES_LEININGEN_PROJECT_FILE" +sed -i "" -E "s/binaryage\\/dirac([ ]*){:mvn\\/version \".*\"}/binaryage\\/dirac\\1{:mvn\\/version \"$VERSION\"}/g" "$EXAMPLES_FIGMAIN_DEPS_FILE" # this is just a sanity check ./scripts/check-versions.sh - -popd