From 936e1a24ced26c8e8f8be82ed88193e6c6890325 Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Tue, 29 Aug 2023 09:36:24 +0100 Subject: [PATCH 1/7] add support for windows Signed-off-by: FaithKovi --- install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 8baf140..46b7e63 100644 --- a/install.sh +++ b/install.sh @@ -32,8 +32,16 @@ while true; do break elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then - echo "CYGWIN is not yet supported" - exit + packages=("git" "gh" "curl" "nodejs") + + for package in "${packages[@]}"; do + if ! command -v "$package" &> /dev/null; then + echo "Installing $package..." + apt-cyg install "$package" + else + echo "$package is already installed." + fi + done fi done From 778ecf9499f83a7e901622e794b6e38277f7ee16 Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 10:31:08 +0100 Subject: [PATCH 2/7] fix package installation for windows Signed-off-by: FaithKovi --- install.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 46b7e63..19ea2f1 100644 --- a/install.sh +++ b/install.sh @@ -32,16 +32,8 @@ while true; do break elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then - packages=("git" "gh" "curl" "nodejs") - - for package in "${packages[@]}"; do - if ! command -v "$package" &> /dev/null; then - echo "Installing $package..." - apt-cyg install "$package" - else - echo "$package is already installed." - fi - done + iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + choco install -y git gh curl nodejs fi done From 4a6de306c79aebb356c5b008adcb5ed6d8fb28a6 Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 12:58:23 +0100 Subject: [PATCH 3/7] clearing git cache Signed-off-by: FaithKovi --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5ed7845..e809696 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,6 +34,11 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Clear Git Cache + run: | + git gc --prune=now + git remote prune origin + - name: Run shell script run: | chmod +x install.sh From d5c1e61d15b6c1397dc00768b4e546a266d1384a Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 13:54:54 +0100 Subject: [PATCH 4/7] adding fail-fast to matrix strategy Signed-off-by: FaithKovi --- .github/workflows/tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e809696..6d7c54b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,6 +16,7 @@ jobs: name: Test bot script on ${{ matrix.os }} with ${{ matrix.compiler }}. runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest] compiler: [ g++-10 ] @@ -34,11 +35,6 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Clear Git Cache - run: | - git gc --prune=now - git remote prune origin - - name: Run shell script run: | chmod +x install.sh From 8727b35564394a9fd4d072d8493cc1f6ba6b8c52 Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 14:04:51 +0100 Subject: [PATCH 5/7] remove powershell installation Signed-off-by: FaithKovi --- install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/install.sh b/install.sh index 19ea2f1..d05b86c 100644 --- a/install.sh +++ b/install.sh @@ -32,7 +32,6 @@ while true; do break elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then - iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install -y git gh curl nodejs fi From eb026405f520fed825a41c1e1d3f12d0e7ba475e Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 14:18:29 +0100 Subject: [PATCH 6/7] add conditional for package installation Signed-off-by: FaithKovi --- install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d05b86c..786c30d 100644 --- a/install.sh +++ b/install.sh @@ -32,9 +32,16 @@ while true; do break elif [[ $system == "CYGWIN" || "$(uname)" == * ]]; then - choco install -y git gh curl nodejs - fi + packages=("git" "gh" "curl" "nodejs") + for package in "${packages[@]}"; do + if ! command -v "$package" &> /dev/null; then + echo "Installing $package..." + choco install -y "$package" + else + echo "$package is already installed." + fi + done done echo #Configures git From 7002de09b49c97e73043c9cb0d910f715cbd3700 Mon Sep 17 00:00:00 2001 From: FaithKovi Date: Fri, 29 Sep 2023 14:22:12 +0100 Subject: [PATCH 7/7] fix conditional Signed-off-by: FaithKovi --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 786c30d..baef7a6 100644 --- a/install.sh +++ b/install.sh @@ -42,7 +42,11 @@ while true; do echo "$package is already installed." fi done + echo "Packages installed successfully." + break + fi done + echo #Configures git read -p $'\e[1mEnter Github username: \e[22m' username