Skip to content

Commit

Permalink
ahanna epa
Browse files Browse the repository at this point in the history
  • Loading branch information
ktauchathuranga committed Dec 8, 2024
1 parent cf2c37e commit e8e9a3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion action.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def validate_dependencies():
def validate_code_style():
try:
result = subprocess.run(
["arduino-cli", "lint"],
["arduino-cli", "arduino-lint"],
capture_output=True,
text=True,
check=True
Expand Down
26 changes: 11 additions & 15 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,18 @@ PR_TITLE=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)
PR_VERSION=$(grep '^version=' library.properties | cut -d'=' -f2)
MAIN_VERSION=$(git fetch origin main && git checkout origin/main -- library.properties && grep '^version=' library.properties | cut -d'=' -f2)

# Install arduino-cli manually if not already installed
if ! command -v arduino-cli &> /dev/null; then
echo "Installing latest arduino-cli..."

# Set the installation directory
INSTALL_DIR="/github/workspace/bin"
mkdir -p "$INSTALL_DIR"

# Download and install the latest version of Arduino CLI
curl -fsSL https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz | tar -xz -C "$INSTALL_DIR"

# Add to PATH
export PATH="$INSTALL_DIR:$PATH"
echo "arduino-cli installed successfully at $INSTALL_DIR"
# Install arduino-cli manually
if ! command -v arduino-cli &> /dev/null
then
echo "arduino-cli not found, installing..."

# Download the Arduino CLI binary
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh

# Move to a directory in PATH
mv bin/arduino-cli /usr/local/bin/
else
echo "arduino-cli already installed."
echo "arduino-cli already installed"
fi

# Export variables for Python script
Expand Down

0 comments on commit e8e9a3c

Please sign in to comment.