From 0f3395fbf84e752de2dec863c811c72dad056e60 Mon Sep 17 00:00:00 2001 From: Nicholas Long Date: Tue, 12 May 2020 09:17:23 -0600 Subject: [PATCH] remove hardcoded install versions --- ci/appveyor/setup.cmd | 11 +++++++---- ci/travis/install_openstudio.sh | 8 ++------ ci/travis/setup.sh | 12 +++++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ci/appveyor/setup.cmd b/ci/appveyor/setup.cmd index c20299c6d..de1f04485 100644 --- a/ci/appveyor/setup.cmd +++ b/ci/appveyor/setup.cmd @@ -1,10 +1,13 @@ set PATH=C:\Program Files\Git\mingw64\bin;C:\projects\openstudio\bin;%PATH% set GEM_HOME=C:\projects\openstudio-server\gems set GEM_PATH=C:\projects\openstudio-server\gems;C:\projects\openstudio-server\gems\gems\bundler\gems -echo Downloading and Installing OpenStudio (develop branch, %OPENSTUDIO_VERSION%%OPENSTUDIO_VERSION_EXT%.%OPENSTUDIO_VERSION_SHA%) -REM install develop build -curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/3.0.0/OpenStudio-3.0.0%%2B1c9617fa4e-Windows.exe -OpenStudio-3.0.0%%2B1c9617fa4e-Windows.exe --script ci/appveyor/install-windows.qs +echo Downloading and Installing OpenStudio (develop branch, %OPENSTUDIO_VERSION%%OPENSTUDIO_VERSION_EXT%+%OPENSTUDIO_VERSION_SHA%) +REM install develop build +set OS_INSTALL_NAME=OpenStudio-%OPENSTUDIO_VERSION%%OPENSTUDIO_VERSION_EXT%%%2B%OPENSTUDIO_VERSION_SHA%-Windows.exe +echo Install name is %OS_INSTALL_NAME% +curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/%OPENSTUDIO_VERSION%/%OS_INSTALL_NAME% +dir . +%OS_INSTALL_NAME% --script ci/appveyor/install-windows.qs move C:\openstudio C:\projects\openstudio dir C:\projects\openstudio dir C:\projects\openstudio\Ruby diff --git a/ci/travis/install_openstudio.sh b/ci/travis/install_openstudio.sh index 1c2b8e6f4..002f2be5f 100755 --- a/ci/travis/install_openstudio.sh +++ b/ci/travis/install_openstudio.sh @@ -8,13 +8,9 @@ OPENSTUDIO_VERSION_EXT=$3 if [ ! -z ${OPENSTUDIO_VERSION} ] && [ ! -z ${OPENSTUDIO_SHA} ]; then # OPENSTUDIO_VERSION_EXT may be empty - #OPENSTUDIO_DOWNLOAD_FILENAME=OpenStudio-$OPENSTUDIO_VERSION$OPENSTUDIO_VERSION_EXT.$OPENSTUDIO_SHA-Linux.deb - # Dev3 hardcoding: - OPENSTUDIO_DOWNLOAD_FILENAME=OpenStudio-3.0.0%2B1c9617fa4e-Linux.deb - + OPENSTUDIO_DOWNLOAD_FILENAME=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}%2B${OPENSTUDIO_SHA}-Linux.deb echo "Installing OpenStudio ${OPENSTUDIO_DOWNLOAD_FILENAME}" - - OPENSTUDIO_DOWNLOAD_BASE_URL=https://openstudio-builds.s3.amazonaws.com/3.0.0/ + OPENSTUDIO_DOWNLOAD_BASE_URL=https://openstudio-builds.s3.amazonaws.com/3${OPENSTUDIO_VERSION}/ OPENSTUDIO_DOWNLOAD_URL=$OPENSTUDIO_DOWNLOAD_BASE_URL/$OPENSTUDIO_DOWNLOAD_FILENAME # copying this from the docker-openstudio dockerfile diff --git a/ci/travis/setup.sh b/ci/travis/setup.sh index 6b7ca7a37..8cb576b90 100755 --- a/ci/travis/setup.sh +++ b/ci/travis/setup.sh @@ -26,14 +26,16 @@ else cp mongodb-osx-x86_64-3.4.18/bin/* /usr/local/bin/ # Install openstudio -- Use the install script that is in this repo now, the one on OpenStudio/develop has changed - curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/3.0.0/OpenStudio-3.0.0%2B1c9617fa4e-Darwin.dmg - # OSX downloads with %2B. These are unsafe chars in url strings - hdiutil attach OpenStudio-3.0.0%2B1c9617fa4e-Darwin.dmg + export OS_NAME=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}%2B${OPENSTUDIO_VERSION_SHA}-Darwin + export OS_NAME_WITH_PLUS=OpenStudio-${OPENSTUDIO_VERSION}${OPENSTUDIO_VERSION_EXT}+${OPENSTUDIO_VERSION_SHA}-Darwin + curl -SLO --insecure https://openstudio-builds.s3.amazonaws.com/${OPENSTUDIO_VERSION}/${OS_NAME}.dmg + # OSX downloads with %2B but installs with + sign. These are the encoded chars in url strings. + hdiutil attach ${OS_NAME}.dmg sed -i -e "s|REPLACEME|$HOME/openstudio|" ci/travis/install-mac.qs rm -rf $HOME/openstudio # Will install into $HOME/openstudio and RUBYLIB will be $HOME/openstudio/Ruby - sudo /Volumes/OpenStudio-3.0.0+1c9617fa4e-Darwin/OpenStudio-3.0.0+1c9617fa4e-Darwin.app/Contents/MacOS/OpenStudio-3.0.0+1c9617fa4e-Darwin --script ci/travis/install-mac.qs - hdiutil detach /Volumes/OpenStudio-3.0.0+1c9617fa4e -force + sudo /Volumes/${OS_NAME_WITH_PLUS}/${OS_NAME_WITH_PLUS}.app/Contents/MacOS/${OS_NAME_WITH_PLUS} --script ci/travis/install-mac.qs + hdiutil detach /Volumes/${OS_NAME_WITH_PLUS} -force export PATH="$TRAVIS_BUILD_DIR/gems/bin:/usr/local/opt/ruby@2.5/bin:$HOME/openstudio/bin:$PATH" export RUBYLIB="$HOME/openstudio/Ruby"