codeforge-cli 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/forge +13 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +2 -1
package/bin/forge
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Forge CLI wrapper - launches the actual binary from lib/
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
# Resolve symlinks to find the real script location
|
|
5
|
+
SCRIPT="$0"
|
|
6
|
+
while [ -L "$SCRIPT" ]; do
|
|
7
|
+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
8
|
+
SCRIPT="$(readlink "$SCRIPT")"
|
|
9
|
+
# Handle relative symlinks
|
|
10
|
+
case "$SCRIPT" in
|
|
11
|
+
/*) ;;
|
|
12
|
+
*) SCRIPT="$SCRIPT_DIR/$SCRIPT" ;;
|
|
13
|
+
esac
|
|
14
|
+
done
|
|
15
|
+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
4
16
|
LIB_DIR="$SCRIPT_DIR/../lib"
|
|
5
17
|
|
|
6
18
|
if [ -x "$LIB_DIR/forge" ]; then
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -135,7 +135,8 @@ async function main() {
|
|
|
135
135
|
// Construct download URL
|
|
136
136
|
const ext = platform === 'windows' ? 'zip' : 'tar.gz';
|
|
137
137
|
const archiveName = `forge-${platform}-${arch}.${ext}`;
|
|
138
|
-
|
|
138
|
+
// Use 'latest' folder directly (no 'v' prefix)
|
|
139
|
+
const downloadUrl = `${DOWNLOAD_BASE}/${VERSION}/${archiveName}`;
|
|
139
140
|
const archivePath = path.join(LIB_DIR, archiveName);
|
|
140
141
|
|
|
141
142
|
// Download
|