From b85d3cbee4ca0313cf54eadd00f99ff8f6ae1451 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Thu, 10 Oct 2024 11:42:48 +0200 Subject: [PATCH 1/9] update version number in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 187bc29..b45f9be 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ If you want to use `sumo-gui` and/or `netedit`, you need to install XQuartz as a ## Usage -By default, the above command lines install a bottled SUMO stable version (currently ```1.20.0```) with minimal requirements (```fox```, ```proj```, ```xerces-c```). +By default, the above command lines install a bottled SUMO stable version (currently ```1.21.0```) with minimal requirements (```fox```, ```proj```, ```xerces-c```). Alternatively, ```brew``` can compile SUMO from source with the following command line options: From 05f58dcee0f744255c3dc7dfb252b415edd466f3 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Thu, 10 Oct 2024 11:43:17 +0200 Subject: [PATCH 2/9] update alias --- Aliases/{sumo@1.20 => sumo@1.21} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Aliases/{sumo@1.20 => sumo@1.21} (100%) diff --git a/Aliases/sumo@1.20 b/Aliases/sumo@1.21 similarity index 100% rename from Aliases/sumo@1.20 rename to Aliases/sumo@1.21 From 820399ab99660d7f2be67f83985439e1a4e7e9fd Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Thu, 10 Oct 2024 11:44:06 +0200 Subject: [PATCH 3/9] archive formula for version 1.20.0 --- Formula/sumo@1.20.0.rb | 136 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Formula/sumo@1.20.0.rb diff --git a/Formula/sumo@1.20.0.rb b/Formula/sumo@1.20.0.rb new file mode 100644 index 0000000..40f7f14 --- /dev/null +++ b/Formula/sumo@1.20.0.rb @@ -0,0 +1,136 @@ +class SumoAT1200 < Formula + desc "Simulation of Urban MObility" + homepage "https://www.eclipse.dev/sumo" + url "https://sumo.dlr.de/releases/1.20.0/sumo-src-1.20.0.tar.gz" + sha256 "34320ba1695db74c769d6b4931cb6bc6ec5b26c37e556451ab29d3963d6af8ec" + license "EPL-2.0" + head "https://github.com/eclipse-sumo/sumo.git", branch: "main" + + bottle do + root_url "https://github.com/DLR-TS/homebrew-sumo/releases/download/sumo-1.20.0" + sha256 cellar: :any, arm64_sonoma: "de437553bbfff2c123b1e2c90f2bc0e35693cb34a1f371887891cd837577a279" + sha256 cellar: :any, arm64_ventura: "0416595756b2ce18e84c6c760257982210ffb3df07c9c43f60ade8a26d34578d" + sha256 cellar: :any, ventura: "711ff64f1d59c52b669a340cc3924097cdc1bbbc0000042b28e13156051d5f21" + sha256 cellar: :any, monterey: "dd3c1d156ed3a48fbe61227a314b213ae4c6c903cf03edb4f5e344b3689a09c3" + end + + option "with-examples", "Install docs/examples and docs/tutorial folder" + + depends_on "cmake" => :build + depends_on "fontconfig" + depends_on "fox" + # indirect dependencies due to fox + depends_on "freetype" + depends_on "gettext" + depends_on "jpeg-turbo" + depends_on "libice" + depends_on "libpng" + depends_on "libtiff" + depends_on "libx11" + depends_on "libxcursor" + depends_on "libxext" + depends_on "libxfixes" + depends_on "libxft" + depends_on "libxi" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "mesa" + depends_on "mesa-glu" + + depends_on "proj" + depends_on "python" if build.head? && build.with?("examples") + depends_on "xerces-c" + + depends_on "ffmpeg" => :optional + depends_on "gdal" => :optional + depends_on "gl2ps" => :optional + depends_on "open-scene-graph" => :optional + depends_on "swig" => :optional + + # workaround due to dependency gdal -> numpy -> openblas -> gcc (originally gfortran) + # (use 'brew deps --tree sumo' to see dependencies of higher levels) + # also see: https://github.com/davidchall/homebrew-hep/issues/28 + cxxstdlib_check :skip + + def install + # cf. https://rubydoc.brew.sh/Formula.html#std_cmake_args-instance_method + cmake_args = *std_cmake_args(find_framework: "LAST") + + # bottling uses default formula options and we want minimal requirement bottles, + # therefore, by default, do not check for optional libs + if build.with?("ffmpeg") || + build.with?("gdal") || + build.with?("gl2ps") || + build.with?("open-scene-graph") + ohai "Enabling check for optional libraries..." + cmake_args << "-DCHECK_OPTIONAL_LIBS=ON" + else + cmake_args << "-DCHECK_OPTIONAL_LIBS=OFF" + end + + # If found, SWIG is enabled by default by sumo cmake config step + # but Java/Python library paths found by cmake might still be broken, + # so we disable SWIG by default here. + cmake_args << "-DSWIG_EXECUTABLE=\"\"" if build.without?("swig") + # XXX: pointers for getting '--with-swig' to work: + # cmake_args << "-DJAVA_HOME=#{Formula["openjdk"].opt_prefix}/libexec/openjdk.jdk/Contents/Home" + # cmake_args << "-DPython_ROOT_DIR=#{Formula["python"].opt_prefix}" + + mkdir "build/cmake-build" do # creates and changes to dir in block + system "cmake", "../..", *cmake_args + system "make" + system "make", "install" + system "make", "examples" if build.head? && build.with?("examples") + end + + if build.with?("examples") + (pkgshare/"docs").install "docs/examples" + (pkgshare/"docs").install "docs/tutorial" + end + end + + def caveats + <<~EOS + In order to let X11 start automatically whenever a GUI-based SUMO application + (e.g., "sumo-gui") is called, you need to log out and in again. + Alternatively, start X11 manually by pressing cmd-space and entering "XQuartz". + + Don't forget to set your SUMO_HOME environment variable: + export SUMO_HOME="#{prefix}/share/sumo" + + Please report any problems with this formula directly to the eclipse-sumo/sumo issue tracker: + https://github.com/eclipse-sumo/sumo/issues + + EOS + end + + test do # will create, run in and delete a temporary directory + # This small test verifies the functionality of SUMO. + # Run with 'brew test sumo'. + # Options passed to 'brew install' such as '--HEAD' also need to be provided to 'brew test'. + + (testpath/"nodes.xml").write <<~EOS + + + + + EOS + + (testpath/"edges.xml").write <<~EOS + + + + EOS + + system "#{bin}/netconvert", "-n", "#{testpath}/nodes.xml", "-e", "#{testpath}/edges.xml", "-o", + "#{testpath}/net.xml" + + (testpath/"flows.xml").write <<~EOS + + + + EOS + + system "#{bin}/sumo", "-n", "#{testpath}/net.xml", "-r", "#{testpath}/flows.xml" + end +end From 30a0c7aed5e922d800f5bb69b99ba34944c73e70 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Thu, 10 Oct 2024 11:46:05 +0200 Subject: [PATCH 4/9] update formula to v1.21.0 --- Formula/sumo.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Formula/sumo.rb b/Formula/sumo.rb index d2669b8..6522bc5 100644 --- a/Formula/sumo.rb +++ b/Formula/sumo.rb @@ -1,18 +1,15 @@ class Sumo < Formula desc "Simulation of Urban MObility" homepage "https://www.eclipse.dev/sumo" - url "https://sumo.dlr.de/releases/1.20.0/sumo-src-1.20.0.tar.gz" - sha256 "34320ba1695db74c769d6b4931cb6bc6ec5b26c37e556451ab29d3963d6af8ec" + url "https://sumo.dlr.de/releases/1.21.0/sumo-src-1.21.0.tar.gz" + sha256 "1a246c30159abd4b5a878c0ce4eba3779bc6fce95f9c815c5f45567ceaa4ea53" license "EPL-2.0" head "https://github.com/eclipse-sumo/sumo.git", branch: "main" - bottle do - root_url "https://github.com/DLR-TS/homebrew-sumo/releases/download/sumo-1.20.0" - sha256 cellar: :any, arm64_sonoma: "de437553bbfff2c123b1e2c90f2bc0e35693cb34a1f371887891cd837577a279" - sha256 cellar: :any, arm64_ventura: "0416595756b2ce18e84c6c760257982210ffb3df07c9c43f60ade8a26d34578d" - sha256 cellar: :any, ventura: "711ff64f1d59c52b669a340cc3924097cdc1bbbc0000042b28e13156051d5f21" - sha256 cellar: :any, monterey: "dd3c1d156ed3a48fbe61227a314b213ae4c6c903cf03edb4f5e344b3689a09c3" - end + #stable do + # url "https://sumo.dlr.de/releases/1.21.0/sumo-src-1.21.0.tar.gz" + # sha256 "1a246c30159abd4b5a878c0ce4eba3779bc6fce95f9c815c5f45567ceaa4ea53" + #end option "with-examples", "Install docs/examples and docs/tutorial folder" From 662894bd029182d0e06535bf1609a29739848e1a Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Thu, 10 Oct 2024 12:35:19 +0200 Subject: [PATCH 5/9] minor style change --- Formula/sumo.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Formula/sumo.rb b/Formula/sumo.rb index 6522bc5..be28333 100644 --- a/Formula/sumo.rb +++ b/Formula/sumo.rb @@ -6,10 +6,10 @@ class Sumo < Formula license "EPL-2.0" head "https://github.com/eclipse-sumo/sumo.git", branch: "main" - #stable do - # url "https://sumo.dlr.de/releases/1.21.0/sumo-src-1.21.0.tar.gz" - # sha256 "1a246c30159abd4b5a878c0ce4eba3779bc6fce95f9c815c5f45567ceaa4ea53" - #end + # stable do + # url "https://sumo.dlr.de/releases/1.21.0/sumo-src-1.21.0.tar.gz" + # sha256 "1a246c30159abd4b5a878c0ce4eba3779bc6fce95f9c815c5f45567ceaa4ea53" + # end option "with-examples", "Install docs/examples and docs/tutorial folder" From ead359497cc2b91ef18f61e713b0e457e92ff714 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Sat, 12 Oct 2024 10:24:01 +0200 Subject: [PATCH 6/9] removing update_formula.sh --- update_formula.sh | 81 ----------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100755 update_formula.sh diff --git a/update_formula.sh b/update_formula.sh deleted file mode 100755 index 7ed0429..0000000 --- a/update_formula.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -################################################ -### UPDATES brew sumo formula to new version ### -################################################ - -FORMULA_NAME=dlr-ts/sumo/sumo -README_FILE=README.md - -# check for cmd line parameters -if [ $# -ne 2 ]; then - echo "" - echo "Usage: $0 " - echo "Examples:" - echo " NEW_VERSION: 1.3.1" - echo " SUMO_SRC_URL: https://github.com/eclipse-sumo/sumo/archive/v1_3_1.tar.gz" - echo "" - exit 1 -fi - -NEW_VERSION=$1 -SUMO_SRC_URL=$2 -DATE_STRING=$(date +"%Y-%m-%d") -NEW_MAJOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $1 }') -NEW_MINOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $2 }') -NEW_PATCH=$(echo "${NEW_VERSION}" | awk -F . '{ print $3 }') - -### ARCHIVE formula for old version -# make sure most current version of formula is installed -brew uninstall sumo -brew install sumo - -# figure out version number -OLD_VERSION_WITH_REVISION=$(brew ls sumo --versions | awk '{print $2}') -OLD_VERSION=$(echo "${OLD_VERSION_WITH_REVISION}" | awk -F _ '{print $1}') -OLD_MAJOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $1 }') -OLD_MINOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $2 }') -OLD_PATCH=$(echo "${OLD_VERSION}" | awk -F . '{ print $3 }') -echo "old sumo version: '$OLD_VERSION'" - -# generate full string (including version number) for formula class name -FORMULA_CLASS_NAME="SumoAT$(echo $OLD_VERSION | sed 's/\.//g')" -echo "formula class name: '$FORMULA_CLASS_NAME'" - -ARCHIVED_FORMULA_FILENAME="sumo@${OLD_VERSION}.rb" - -# archive old formula -echo "copying formula to Formula/${ARCHIVED_FORMULA_FILENAME} and updating class name of archived formula..." -sed "s/class Sumo/class ${FORMULA_CLASS_NAME}/" Formula/sumo.rb >> Formula/${ARCHIVED_FORMULA_FILENAME} -echo "done archiving old formula!" - -echo "creating git branch" -git checkout -b sumo - -echo "adding archived formula to git" -git add Formula/${ARCHIVED_FORMULA_FILENAME} -git commit -m "sumo: archive formula for version ${OLD_VERSION}" - -### BUMP formula version (https://docs.brew.sh/Manpage#bump-formula-pr-options-formula) -echo "bumping formula version..." -brew bump-formula-pr -v --write-only --no-audit --url=${SUMO_SRC_URL} ${FORMULA_NAME} -# remove bottle block -# NOTE: dirty hack assumes lines 12-17 (including extra blank line) -sed '12,17d' /usr/local/Homebrew/Library/Taps/dlr-ts/homebrew-sumo/Formula/sumo.rb > Formula/sumo.rb -git add Formula/sumo.rb -git commit -m "sumo: update formula to v${NEW_VERSION}" - -### UPDATE alias link -echo "updating Alias symlink..." -git mv Aliases/sumo\@${OLD_MAJOR}.${OLD_MINOR}.${OLD_PATCH} Aliases/sumo\@${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH} -git commit -m "sumo: update alias" - -### UPDATE version number in README.md -echo "updating version number in README.md" -sed "s/${OLD_VERSION}/${NEW_VERSION}/" ${README_FILE} >> ${README_FILE}.NEW -mv ${README_FILE}.NEW ${README_FILE} -git add ${README_FILE} -git commit -m "update version number in README" - -echo "You now need to create a pull request from the new branch to trigger the workflows ..." -# git push --set-upstream origin sumo From dc06f1609d256ec6a8c719ecdfb86a5c1f6b5fba Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Sat, 12 Oct 2024 10:58:25 +0200 Subject: [PATCH 7/9] attempting to fix shellcheck errors --- .github/workflows/example_tests.yml | 2 +- .github/workflows/publish.yml | 4 +- update_formula.sh | 81 +++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 update_formula.sh diff --git a/.github/workflows/example_tests.yml b/.github/workflows/example_tests.yml index b722d3e..843268e 100644 --- a/.github/workflows/example_tests.yml +++ b/.github/workflows/example_tests.yml @@ -40,4 +40,4 @@ jobs: if: matrix.sumo_version == 'head' run: brew install --with-examples --HEAD sumo - - run: python $(brew --prefix sumo)/share/sumo/docs/examples/runAll.py + - run: python "$(brew --prefix sumo)/share/sumo/docs/examples/runAll.py" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 93540f5..eb8ae83 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ jobs: env: HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} PULL_REQUEST: ${{ github.event.pull_request.number }} - run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST + run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST" - name: Push commits uses: Homebrew/actions/git-try-push@master @@ -30,4 +30,4 @@ jobs: if: github.event.pull_request.head.repo.fork == false env: BRANCH: ${{ github.event.pull_request.head.ref }} - run: git push --delete origin $BRANCH + run: git push --delete origin "$BRANCH" diff --git a/update_formula.sh b/update_formula.sh new file mode 100644 index 0000000..43529ce --- /dev/null +++ b/update_formula.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +################################################ +### UPDATES brew sumo formula to new version ### +################################################ + +FORMULA_NAME=dlr-ts/sumo/sumo +README_FILE=README.md + +# check for cmd line parameters +if [[ $# -ne 2 ]]; then + echo "" + echo "Usage: $0 " + echo "Examples:" + echo " NEW_VERSION: 1.3.1" + echo " SUMO_SRC_URL: https://github.com/eclipse-sumo/sumo/archive/v1_3_1.tar.gz" + echo "" + exit 1 +fi + +NEW_VERSION="$1" +SUMO_SRC_URL="$2" +DATE_STRING=$(date +"%Y-%m-%d") # (currently unused, consider using or removing) +NEW_MAJOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $1 }') +NEW_MINOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $2 }') +NEW_PATCH=$(echo "${NEW_VERSION}" | awk -F . '{ print $3 }') + +### ARCHIVE formula for old version +# make sure most current version of formula is installed +brew uninstall sumo +brew install sumo + +# figure out version number +OLD_VERSION_WITH_REVISION=$(brew ls sumo --versions | awk '{print $2}') +OLD_VERSION=$(echo "${OLD_VERSION_WITH_REVISION}" | awk -F _ '{print $1}') +OLD_MAJOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $1 }') +OLD_MINOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $2 }') +OLD_PATCH=$(echo "${OLD_VERSION}" | awk -F . '{ print $3 }') +echo "old sumo version: '${OLD_VERSION}'" + +# generate full string (including version number) for formula class name +FORMULA_CLASS_NAME="SumoAT${OLD_VERSION//./}" +echo "formula class name: '${FORMULA_CLASS_NAME}'" + +ARCHIVED_FORMULA_FILENAME="sumo@${OLD_VERSION}.rb" + +# archive old formula +echo "copying formula to Formula/${ARCHIVED_FORMULA_FILENAME} and updating class name of archived formula..." +sed "s/class Sumo/class ${FORMULA_CLASS_NAME}/" Formula/sumo.rb >> Formula/"${ARCHIVED_FORMULA_FILENAME}" +echo "done archiving old formula!" + +echo "creating git branch" +git checkout -b sumo + +echo "adding archived formula to git" +git add Formula/"${ARCHIVED_FORMULA_FILENAME}" +git commit -m "sumo: archive formula for version ${OLD_VERSION}" + +### BUMP formula version (https://docs.brew.sh/Manpage#bump-formula-pr-options-formula) +echo "bumping formula version..." +brew bump-formula-pr -v --write-only --no-audit --url="${SUMO_SRC_URL}" "${FORMULA_NAME}" +# remove bottle block +# NOTE: dirty hack assumes lines 12-17 (including extra blank line) +sed '12,17d' /usr/local/Homebrew/Library/Taps/dlr-ts/homebrew-sumo/Formula/sumo.rb > Formula/sumo.rb +git add Formula/sumo.rb +git commit -m "sumo: update formula to v${NEW_VERSION}" + +### UPDATE alias link +echo "updating Alias symlink..." +git mv Aliases/sumo@"${OLD_MAJOR}.${OLD_MINOR}.${OLD_PATCH}" Aliases/sumo@"${NEW_MAJOR}.${NEW_MINOR}.${NEW_PATCH}" +git commit -m "sumo: update alias" + +### UPDATE version number in README.md +echo "updating version number in README.md" +sed "s/${OLD_VERSION}/${NEW_VERSION}/" "${README_FILE}" >> "${README_FILE}.NEW" +mv "${README_FILE}.NEW" "${README_FILE}" +git add "${README_FILE}" +git commit -m "update version number in README" + +echo "You now need to create a pull request from the new branch to trigger the workflows ..." +# git push --set-upstream origin sumo From 2fa8ec0b25a30ccedd0ac61b47a307dc30c7fef5 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Sat, 12 Oct 2024 12:55:30 +0200 Subject: [PATCH 8/9] minor --- update_formula.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/update_formula.sh b/update_formula.sh index 43529ce..4e5ad1d 100644 --- a/update_formula.sh +++ b/update_formula.sh @@ -20,7 +20,6 @@ fi NEW_VERSION="$1" SUMO_SRC_URL="$2" -DATE_STRING=$(date +"%Y-%m-%d") # (currently unused, consider using or removing) NEW_MAJOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $1 }') NEW_MINOR=$(echo "${NEW_VERSION}" | awk -F . '{ print $2 }') NEW_PATCH=$(echo "${NEW_VERSION}" | awk -F . '{ print $3 }') @@ -31,7 +30,7 @@ brew uninstall sumo brew install sumo # figure out version number -OLD_VERSION_WITH_REVISION=$(brew ls sumo --versions | awk '{print $2}') +OLD_VERSION_WITH_REVISION=$(brew ls sumo --versions | awk '{print $2}' || true) OLD_VERSION=$(echo "${OLD_VERSION_WITH_REVISION}" | awk -F _ '{print $1}') OLD_MAJOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $1 }') OLD_MINOR=$(echo "${OLD_VERSION}" | awk -F . '{ print $2 }') From 7581e09021a92190d1664f92811b09bbefb3ffb6 Mon Sep 17 00:00:00 2001 From: Angelo Banse Date: Sat, 12 Oct 2024 19:20:40 +0200 Subject: [PATCH 9/9] applying brew style --fix --- README.md | 2 +- update_formula.sh | 23 ++++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b45f9be..aa1a66d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Alternatively, ```brew``` can compile SUMO from source with the following comman brew install [OPTIONS] sumo - + ==> Options --with-examples Install docs/examples and docs/tutorial folder diff --git a/update_formula.sh b/update_formula.sh index 4e5ad1d..8df4cba 100644 --- a/update_formula.sh +++ b/update_formula.sh @@ -8,14 +8,15 @@ FORMULA_NAME=dlr-ts/sumo/sumo README_FILE=README.md # check for cmd line parameters -if [[ $# -ne 2 ]]; then - echo "" - echo "Usage: $0 " - echo "Examples:" - echo " NEW_VERSION: 1.3.1" - echo " SUMO_SRC_URL: https://github.com/eclipse-sumo/sumo/archive/v1_3_1.tar.gz" - echo "" - exit 1 +if [[ $# -ne 2 ]] +then + echo "" + echo "Usage: $0 " + echo "Examples:" + echo " NEW_VERSION: 1.3.1" + echo " SUMO_SRC_URL: https://github.com/eclipse-sumo/sumo/archive/v1_3_1.tar.gz" + echo "" + exit 1 fi NEW_VERSION="$1" @@ -45,7 +46,7 @@ ARCHIVED_FORMULA_FILENAME="sumo@${OLD_VERSION}.rb" # archive old formula echo "copying formula to Formula/${ARCHIVED_FORMULA_FILENAME} and updating class name of archived formula..." -sed "s/class Sumo/class ${FORMULA_CLASS_NAME}/" Formula/sumo.rb >> Formula/"${ARCHIVED_FORMULA_FILENAME}" +sed "s/class Sumo/class ${FORMULA_CLASS_NAME}/" Formula/sumo.rb >>Formula/"${ARCHIVED_FORMULA_FILENAME}" echo "done archiving old formula!" echo "creating git branch" @@ -60,7 +61,7 @@ echo "bumping formula version..." brew bump-formula-pr -v --write-only --no-audit --url="${SUMO_SRC_URL}" "${FORMULA_NAME}" # remove bottle block # NOTE: dirty hack assumes lines 12-17 (including extra blank line) -sed '12,17d' /usr/local/Homebrew/Library/Taps/dlr-ts/homebrew-sumo/Formula/sumo.rb > Formula/sumo.rb +sed '12,17d' /usr/local/Homebrew/Library/Taps/dlr-ts/homebrew-sumo/Formula/sumo.rb >Formula/sumo.rb git add Formula/sumo.rb git commit -m "sumo: update formula to v${NEW_VERSION}" @@ -71,7 +72,7 @@ git commit -m "sumo: update alias" ### UPDATE version number in README.md echo "updating version number in README.md" -sed "s/${OLD_VERSION}/${NEW_VERSION}/" "${README_FILE}" >> "${README_FILE}.NEW" +sed "s/${OLD_VERSION}/${NEW_VERSION}/" "${README_FILE}" >>"${README_FILE}.NEW" mv "${README_FILE}.NEW" "${README_FILE}" git add "${README_FILE}" git commit -m "update version number in README"