From 03d53e1078228bbd2b8475bcf93f2acf8709bf39 Mon Sep 17 00:00:00 2001 From: MarkG Date: Thu, 13 Jul 2023 15:31:00 +0700 Subject: [PATCH] Passing the $PORT --- .gitignore | 3 ++- bin/compile | 39 ++++++++------------------------------- bin/release | 2 +- 3 files changed, 11 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 4032ec6..bd0b92f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.git/ \ No newline at end of file +.git/ +/.idea diff --git a/bin/compile b/bin/compile index ca4b834..8d2eceb 100644 --- a/bin/compile +++ b/bin/compile @@ -44,30 +44,7 @@ if [ -d "$CACHE_DIR/flutter" ]; then cp -R $CACHE_DIR/flutter $APP_DIR else print "Installing SDK from Github repository." - git clone https://github.com/flutter/flutter.git --quiet -fi - -# Check if FLUTTER_VERSION variables is set. -if [ -n "$FLUTTER_VERSION" ]; then - # Load bash variables from flutter --machine --version and read it like $FLUTTER_VERSION variable. - flutter/bin/flutter --machine --version >flutter.json - FLUTTER_INSTALLED_VERSION=$(grep -o '"frameworkVersion": *"[^"]*' flutter.json | grep -o '[^"]*$') - - # Check if the FLUTTER_VERSION is the same with the installed one. - if [ "$FLUTTER_VERSION" != "$FLUTTER_INSTALLED_VERSION" ]; then - print "Installing Flutter SDK version : $FLUTTER_VERSION" - flutter/bin/flutter version $FLUTTER_VERSION --quiet | indent - fi - rm flutter.json - -else - - print "Running flutter upgrade command" - if [ "$channel" != "beta" ]; then - flutter/bin/flutter channel beta | indent - fi - - flutter/bin/flutter upgrade --quiet | indent + git clone https://github.com/flutter/flutter.git --branch $FLUTTER_VERSION --quiet --single-branch | indent fi print "Enabling Web support" @@ -77,7 +54,7 @@ print "Running flutter clean command." flutter/bin/flutter clean --quiet | indent print "Getting packages from Flutter project" -flutter/bin/flutter pub get --quiet | indent +flutter/bin/flutter pub get | indent PATH="$PATH":"$(pwd)/flutter/bin/" @@ -119,17 +96,17 @@ fi # Is taken from my Github repo because some variables need to be changed every run # like PORT from environment. -if [ -d "$CACHE_DIR/.pub-cache/" ]; then - print "dhttpd Found in cache. Restoring." - cp -R $CACHE_DIR/.pub-cache/* $PUB_CACHE -else +#if [ -d "$CACHE_DIR/.pub-cache/" ]; then +# print "dhttpd Found in cache. Restoring." +# cp -R $CACHE_DIR/.pub-cache/* $PUB_CACHE +#else print "Getting dhttpd to run web service." - $APP_DIR/dart-sdk/bin/dart pub global activate -sgit https://github.com/diezep/dhttpd.git | indent + $APP_DIR/dart-sdk/bin/dart pub global activate dhttpd | indent print "Getting dhtppd to run web service." mkdir -p $CACHE_DIR/.pub-cache/ cp -R $PUB_CACHE/* $CACHE_DIR/.pub-cache/ -fi +#fi # Moving to the build, after running the compile. All will be deleted and removed to app directory. # Copying the result, the files will be kept in storage. diff --git a/bin/release b/bin/release index b2c2175..0dc9b76 100644 --- a/bin/release +++ b/bin/release @@ -16,6 +16,6 @@ fi cat <