diff --git a/CHANGELOG.md b/CHANGELOG.md index 771b13c9f..397230936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Reduced down time during upgrades - Architecture changes to allow including React.js components into the application +- Allow running upgrade scripts from dev ranch - Fix a bug: script mount-webpack.sh was not updating the docker-compose.yml file - Fix a security issue: updated resolve-url-loader to 3.1.2 to fix [CVE-2020-15256](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15256) - Fix a security issue: updated selfsigned to 1.10.8 to fix [CVE-2020-7720](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7720) diff --git a/setup/upgrade.sh b/setup/upgrade.sh index d4de667de..ecac3ff31 100644 --- a/setup/upgrade.sh +++ b/setup/upgrade.sh @@ -125,11 +125,13 @@ upgrade() printf "An error occured, detected service name: %s\nExiting...", "$SERVICE" exit 1 fi + BRANCH='master' + if yq r docker-compose.yml 'services.*(.==sleede/fab-manager*)' | grep -q ':dev'; then BRANCH='dev'; fi for SCRIPT in "${SCRIPTS[@]}"; do if [[ "$YES_ALL" = "true" ]]; then - \curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash -s -- -y + \curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/$BRANCH/scripts/$SCRIPT.sh" | bash -s -- -y else - \curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/master/scripts/$SCRIPT.sh" | bash + \curl -sSL "https://raw.githubusercontent.com/sleede/fab-manager/$BRANCH/scripts/$SCRIPT.sh" | bash fi done compile_assets_and_migrate