Skip to content

Commit

Permalink
chore: update workflow to build from hotfix branch
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertByrnes committed Jul 23, 2024
1 parent 505ca2e commit 4fb129b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/arduino_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install specific branch of GovoroxSSLClient
run: |
mkdir -p ~/Arduino/libraries
git clone --branch v1.3.0 https://github.com/govorox/SSLClient.git ~/Arduino/libraries/GovoroxSSLClient
git clone --branch 95-release-130-fails-to-compile-on-arduino-esp32-v3 https://github.com/govorox/SSLClient.git ~/Arduino/libraries/GovoroxSSLClient
- name: Install other libs
run: |
Expand Down
48 changes: 46 additions & 2 deletions .github/workflows/scripts/install_sslclient_for_testing.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,56 @@
#!/usr/bin/bash

# Function to print usage
print_usage() {
echo "Usage: $0 [--branch <branch_name>]"
echo " --branch <branch_name> Specify the branch to checkout (default: master)"
}

# Default branch name
BRANCH="master"

# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--branch)
if [[ -n $2 && ! $2 =~ ^- ]]; then
BRANCH=$2
shift
else
echo "Error: --branch requires a non-empty option argument."
print_usage
exit 1
fi
;;
*)
echo "Unknown parameter passed: $1"
print_usage
exit 1
;;
esac
shift
done

# Remove previous SSLClient directory if exists
rm -rf ~/SSLClient

# Clone the repository
git clone https://github.com/govorox/SSLClient.git ~/SSLClient
cd ~/SSLClient
git checkout 95-release-130-fails-to-compile-on-arduino-esp32-v3

# Navigate to the cloned directory
cd ~/SSLClient || { echo "Failed to change directory to ~/SSLClient"; exit 1; }

# Checkout the specified branch
git checkout "$BRANCH"

# Prepare the directory for zipping
mkdir -p SSLClient
mv LICENSE library.properties src SSLClient/
zip -r SSLClient.zip SSLClient

# Create Arduino CLI configuration directory and file if not exists
mkdir -p ~/.arduino15
echo -e "library:\n enable_unsafe_install: true" > ~/.arduino15/arduino-cli.yaml

# Install the library using Arduino CLI
arduino-cli lib install --config-file ~/.arduino15/arduino-cli.yaml --zip-path SSLClient.zip

0 comments on commit 4fb129b

Please sign in to comment.