From 521be7b8250f618567f17c15d5c3d87812759d8a Mon Sep 17 00:00:00 2001 From: Michiel Hazelhof Date: Wed, 4 Jan 2023 01:23:30 +0100 Subject: [PATCH] Fix circleci --- .circleci/config.yml | 2 +- build.ps1 | 13 ++++++++++--- build.sh | 15 ++++++++++----- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d1008c..6bbf697 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,4 +12,4 @@ jobs: command: ./generateKeys.sh - run: name: Build script - command: ./build.sh \ No newline at end of file + command: ./build.sh y \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 56b3774..b8eda44 100644 --- a/build.ps1 +++ b/build.ps1 @@ -43,9 +43,16 @@ foreach ($instance in $oldinstances) { } # update bitwarden itself -$confirmation = Read-Host "Update (or get) bitwarden source container" -if ($confirmation -eq 'y') { - docker pull bitwarden/self-host:beta +if ($args[0] -eq 'y') +{ + docker pull bitwarden/self-host:beta +} +else +{ + $confirmation = Read-Host "Update (or get) bitwarden source container" + if ($confirmation -eq 'y') { + docker pull bitwarden/self-host:beta + } } # stop and remove previous existing patch(ed) container diff --git a/build.sh b/build.sh index 5d4e629..3f2dd23 100755 --- a/build.sh +++ b/build.sh @@ -46,13 +46,18 @@ for INSTANCE in ${OLDINSTANCES[@]}; do done # update bitwarden itself -read -p "Update (or get) bitwarden source container: " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]] -then - docker pull bitwarden/self-host:beta +if [ "$1" = "y" ]; then + docker pull bitwarden/self-host:beta +else + read -p "Update (or get) bitwarden source container: " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]] + then + docker pull bitwarden/self-host:beta + fi fi + # stop and remove previous existing patch(ed) container docker stop bitwarden-patch docker rm bitwarden-patch