Skip to content

Commit

Permalink
scripts: teach update-version.sh to update example projects as well
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed Sep 17, 2019
1 parent 7096ec8 commit eac3029
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions scripts/_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 3 additions & 4 deletions scripts/update-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
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

sed -i "" -e "s/defproject binaryage\/dirac \".*\"/defproject binaryage\/dirac \"$VERSION\"/g" "$PROJECT_FILE"
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

0 comments on commit eac3029

Please sign in to comment.