From edb09e557496617614bf1d8f70ec5b9605646aef Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Tue, 15 Aug 2017 13:48:04 -0700 Subject: [PATCH 1/6] Added c++ dependency to .travis.yml --- .travis.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c228950..88538d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,28 @@ sudo: required language: cpp -before_install: sudo apt-get update +matrix: + include: + # works on Precise and Trusty + - os: linux + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-6 + env: + - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" + + - os: osx + osx_image: xcode8 + env: + - MATRIX_EVAL="brew install gcc && CC=gcc-6 && CXX=g++-6" + +before_install: + - sudo apt-get update + - eval "${MATRIX_EVAL}" install: ./install.sh script: ant test after_script: ./uninstall.sh +after_success: + - bash <(curl -s https://codecov.io/bash) From 7ebe6d05163ea80372cf30386be3262b461ddb63 Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Tue, 15 Aug 2017 14:24:05 -0700 Subject: [PATCH 2/6] Merge install and uninstall scripts for mac and linux --- .travis.yml | 10 ++++++---- install.sh | 8 ++++++-- mac_install.sh | 5 ----- mac_uninstall.sh | 6 ------ uninstall.sh | 5 ++++- 5 files changed, 16 insertions(+), 18 deletions(-) delete mode 100755 mac_install.sh delete mode 100755 mac_uninstall.sh diff --git a/.travis.yml b/.travis.yml index 88538d7..13f90ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,10 +19,12 @@ matrix: - MATRIX_EVAL="brew install gcc && CC=gcc-6 && CXX=g++-6" before_install: - - sudo apt-get update - eval "${MATRIX_EVAL}" -install: ./install.sh -script: ant test -after_script: ./uninstall.sh +install: + - ./install.sh +script: + - ant test +after_script: + - ./uninstall.sh after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/install.sh b/install.sh index 3c1b205..11ce3c4 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,9 @@ -sudo apt-get update -sudo apt-get install libjsoncpp-dev +if [ $kernel == "Darwin" ]; then + brew install jsoncpp +else + sudo apt-get update + sudo apt-get install libjsoncpp-dev + cp lib/anttasks.jar ~ pushd ~ jar xf anttasks.jar diff --git a/mac_install.sh b/mac_install.sh deleted file mode 100755 index 0c32d3e..0000000 --- a/mac_install.sh +++ /dev/null @@ -1,5 +0,0 @@ -brew install jsoncpp -cp lib/anttasks.jar ~ -pushd ~ -jar xf anttasks.jar -pushd -0 diff --git a/mac_uninstall.sh b/mac_uninstall.sh deleted file mode 100755 index 117094b..0000000 --- a/mac_uninstall.sh +++ /dev/null @@ -1,6 +0,0 @@ -brew uninstall jsoncpp -cd ../ -echo "Deleting project files" -rm -rf TicketingSystem -echo "Removing additional installed library" -rm -rf ~/anttasks.jar diff --git a/uninstall.sh b/uninstall.sh index 27d720b..02eddd0 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,4 +1,7 @@ -sudo apt-get remove --purge libjsoncpp-dev +if [ $kernel == "Darwin" ]; then + sudo apt-get remove --purge libjsoncpp-dev +else + brew uninstall jsoncpp cd ../ echo "Deleting project files" rm -rf TicketingSystem From f3258f3e138134287c336d51db1756ac299a7115 Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Tue, 15 Aug 2017 19:26:51 -0700 Subject: [PATCH 3/6] Fix missing 'fi' in install and uninstall script --- install.sh | 1 + uninstall.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 11ce3c4..e2f6a67 100755 --- a/install.sh +++ b/install.sh @@ -3,6 +3,7 @@ if [ $kernel == "Darwin" ]; then else sudo apt-get update sudo apt-get install libjsoncpp-dev +fi cp lib/anttasks.jar ~ pushd ~ diff --git a/uninstall.sh b/uninstall.sh index 02eddd0..7da462f 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,6 +2,8 @@ if [ $kernel == "Darwin" ]; then sudo apt-get remove --purge libjsoncpp-dev else brew uninstall jsoncpp +fi + cd ../ echo "Deleting project files" rm -rf TicketingSystem From c22c393f9d7931a69659c5209fcbed84ea597dd6 Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Wed, 16 Aug 2017 16:23:02 -0700 Subject: [PATCH 4/6] changed env for macOS --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 13f90ea..f5d229f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ matrix: - os: osx osx_image: xcode8 env: - - MATRIX_EVAL="brew install gcc && CC=gcc-6 && CXX=g++-6" + - MATRIX_EVAL="brew cask uninstall oclint && brew install gcc@6 && CC=gcc-6 && CXX=g++-6" before_install: - eval "${MATRIX_EVAL}" From 4beca75a979df2f7787b9464f6633d0a390b1bfe Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Wed, 16 Aug 2017 17:14:03 -0700 Subject: [PATCH 5/6] Added ant to mac side of install and uninstall scripts --- install.sh | 1 + uninstall.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/install.sh b/install.sh index e2f6a67..99bbda1 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,5 @@ if [ $kernel == "Darwin" ]; then + brew install ant brew install jsoncpp else sudo apt-get update diff --git a/uninstall.sh b/uninstall.sh index 7da462f..fed60d4 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -2,6 +2,7 @@ if [ $kernel == "Darwin" ]; then sudo apt-get remove --purge libjsoncpp-dev else brew uninstall jsoncpp + brew uninstall ant fi cd ../ From 5c675d877df810b28d8f093261e8240ec5e6640f Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Wed, 16 Aug 2017 18:01:19 -0700 Subject: [PATCH 6/6] Replaced kernel with uname --- install.sh | 2 +- uninstall.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 99bbda1..5639e5f 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -if [ $kernel == "Darwin" ]; then +if [ $(uname) == "Darwin" ]; then brew install ant brew install jsoncpp else diff --git a/uninstall.sh b/uninstall.sh index fed60d4..407933e 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,8 +1,8 @@ -if [ $kernel == "Darwin" ]; then - sudo apt-get remove --purge libjsoncpp-dev -else +if [ $(uname) == "Darwin" ]; then brew uninstall jsoncpp brew uninstall ant +else + sudo apt-get remove --purge libjsoncpp-dev fi cd ../