Skip to content

Commit

Permalink
changed from cx-mac to cx-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
BenAlvo1 committed Jan 28, 2025
1 parent f7008b1 commit fbc8c25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/extract_cli_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ echo "Found JAR at: $JAR_PATH"
TEMP_DIR=$(mktemp -d)
echo "Using temporary directory: $TEMP_DIR"

unzip -j "$JAR_PATH" "cx-mac" -d "$TEMP_DIR"
unzip -j "$JAR_PATH" "cx-linux" -d "$TEMP_DIR"
if [ $? -ne 0 ]; then
echo "Error: Failed to unzip cx-linux from the JAR."
exit 1
fi

if [ ! -f "$TEMP_DIR/cx-mac" ]; then
if [ ! -f "$TEMP_DIR/cx-linux" ]; then
echo "Error: cx-linux not found inside the JAR."
ls -la "$TEMP_DIR"
exit 1
fi

chmod +x "$TEMP_DIR/cx-mac"
chmod +x "$TEMP_DIR/cx-linux"

# Extract the CLI version
CLI_VERSION=$("$TEMP_DIR/cx-mac" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
CLI_VERSION=$("$TEMP_DIR/cx-linux" version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')

if [ -z "$CLI_VERSION" ]; then
echo "Error: CLI_VERSION is not set or is empty."
Expand Down

0 comments on commit fbc8c25

Please sign in to comment.