Skip to content

Commit 918cd83

Browse files
chore(naming) fixes
1 parent 22a18c3 commit 918cd83

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ jobs:
7777
- name: Archive binaries
7878
run: |
7979
cd dist
80-
zip json-to-sql-linux.zip json-to-sql-Linux
81-
zip json-to-sql-macos.zip json-to-sql-macOS
80+
zip json-to-sql-Linux.zip json-to-sql-Linux
81+
zip json-to-sql-macOs.zip json-to-sql-macOS
8282
- name: Create GitHub Release
8383
uses: softprops/action-gh-release@v2
8484
with:
@@ -87,7 +87,7 @@ jobs:
8787
name: Release ${{ github.ref }}
8888
body: |
8989
## JSON-to-SQL CLI Release
90-
- **Linux**: `json-to-sql-linux.zip`
91-
- **macOS**: `json-to-sql-macos.zip`
90+
- **Linux**: `json-to-sql-Linux.zip`
91+
- **macOS**: `json-to-sql-macOS.zip`
9292
env:
9393
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

setup.sh

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ TEMP_DIR=$(mktemp -d)
99
# Detect OS
1010
OS="$(uname -s)"
1111
case "$OS" in
12-
Linux*) FILE="json-to-sql-linux.zip" ;;
13-
Darwin*) FILE="json-to-sql-macos.zip" ;;
12+
Linux*) FILE="json-to-sql-Linux.zip" ;;
13+
Darwin*) FILE="json-to-sql-macOS.zip" ;;
1414
*) echo "Unsupported OS: $OS"; exit 1 ;;
1515
esac
1616

@@ -29,9 +29,27 @@ curl -L "$BINARY_URL" -o "$TEMP_DIR/$FILE"
2929
echo "Extracting..."
3030
unzip -q "$TEMP_DIR/$FILE" -d "$TEMP_DIR"
3131

32+
# List contents of the temporary directory for debugging
33+
echo "Contents of $TEMP_DIR:"
34+
ls -l "$TEMP_DIR"
35+
36+
# Check if the extracted directory exists
37+
EXTRACTED_DIR="$TEMP_DIR/json-to-sql-${OS}"
38+
if [[ ! -d "$EXTRACTED_DIR" ]]; then
39+
echo "Error: Extracted directory not found."
40+
exit 1
41+
fi
42+
43+
# Check if the binary exists in the extracted directory
44+
BINARY_PATH="$EXTRACTED_DIR/json-to-sql"
45+
if [[ ! -f "$BINARY_PATH" ]]; then
46+
echo "Error: Extracted binary not found."
47+
exit 1
48+
fi
49+
3250
# Install the binary
3351
echo "Installing to $INSTALL_DIR..."
34-
sudo mv "$TEMP_DIR/json-to-sql" "$INSTALL_DIR/json-to-sql"
52+
sudo mv "$BINARY_PATH" "$INSTALL_DIR/json-to-sql"
3553
sudo chmod +x "$INSTALL_DIR/json-to-sql"
3654

3755
# Cleanup
@@ -43,4 +61,4 @@ if command -v json-to-sql &> /dev/null; then
4361
else
4462
echo "❌ Installation failed."
4563
exit 1
46-
fi
64+
fi

0 commit comments

Comments
 (0)