7878 fi
7979
8080 # Verify the binary was built
81- BINARY_PATH="target/${{ matrix.build.TARGET }}/release/gitforge " # Adjust if your binary name is different
81+ BINARY_PATH="target/${{ matrix.build.TARGET }}/release/gitcraft " # Adjust if your binary name is different
8282 if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
8383 BINARY_PATH="${BINARY_PATH}.exe"
8484 fi
@@ -108,7 +108,7 @@ jobs:
108108 run : |
109109 # Run maturin build for the current target platform
110110 # It will use the pyproject.toml in the repo root
111- # Ensure your pyproject.toml has: bindings = "bin" and module-name = "gitforge " (or correct name)
111+ # Ensure your pyproject.toml has: bindings = "bin" and module-name = "gitcraft " (or correct name)
112112 maturin build --release --target ${{ matrix.build.TARGET }}
113113
114114 # Verify the wheel was created
@@ -142,7 +142,7 @@ jobs:
142142 mkdir -p npm/bin
143143
144144 # Copy the built binary to npm/bin (adjust path if different)
145- BINARY_NAME="gitforge "
145+ BINARY_NAME="gitcraft "
146146 if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
147147 BINARY_NAME="${BINARY_NAME}.exe"
148148 fi
@@ -151,10 +151,10 @@ jobs:
151151 # Create npm package.json (adjust as needed for your npm package structure)
152152 cat > npm/package.json << EOF
153153 {
154- "name": "@rafaeljohn9/gitforge -${{ matrix.build.NAME }}",
154+ "name": "@rafaeljohn9/gitcraft -${{ matrix.build.NAME }}",
155155 "version": "$VERSION",
156156 "bin": {
157- "gitforge ": "./bin/$BINARY_NAME"
157+ "gitcraft ": "./bin/$BINARY_NAME"
158158 },
159159 "files": ["bin/"],
160160 "license": "APACHE-2.0"
@@ -183,12 +183,12 @@ jobs:
183183 shell : bash
184184 run : |
185185 # Copy the built binary with a platform-specific name for GitHub Release
186- BINARY_NAME="gitforge -${{ matrix.build.NAME }}"
186+ BINARY_NAME="gitcraft -${{ matrix.build.NAME }}"
187187 if [[ "${{ matrix.build.TARGET }}" == *"windows"* ]]; then
188188 BINARY_NAME="${BINARY_NAME}.exe"
189- cp target/${{ matrix.build.TARGET }}/release/gitforge .exe $BINARY_NAME
189+ cp target/${{ matrix.build.TARGET }}/release/gitcraft .exe $BINARY_NAME
190190 else
191- cp target/${{ matrix.build.TARGET }}/release/gitforge $BINARY_NAME
191+ cp target/${{ matrix.build.TARGET }}/release/gitcraft $BINARY_NAME
192192 chmod +x $BINARY_NAME
193193 fi
194194 echo "BINARY=$BINARY_NAME" >> $GITHUB_ENV
@@ -241,29 +241,29 @@ jobs:
241241
242242 - name : Create unified package
243243 run : |
244- mkdir -p gitforge -unified/bin
244+ mkdir -p gitcraft -unified/bin
245245
246246 # Create package.json
247- cat > gitforge -unified/package.json << EOF
247+ cat > gitcraft -unified/package.json << EOF
248248 {
249- "name": "gitforge ",
249+ "name": "gitcraft ",
250250 "version": "${{ env.RELEASE_VERSION }}",
251251 "description": "GitHub Templates CLI tool (platform-aware wrapper)",
252252 "bin": {
253- "gitforge ": "./bin/gitforge "
253+ "gitcraft ": "./bin/gitcraft "
254254 },
255255 "license": "Apache-2.0",
256256 "repository": {
257257 "type": "git",
258258 "url": "git+https://github.com/${{ github.repository }}.git"
259259 },
260260 "optionalDependencies": {
261- "gitforge -linux-x64": "${{ env.RELEASE_VERSION }}",
262- "gitforge -linux-arm64": "${{ env.RELEASE_VERSION }}",
263- "gitforge -darwin-x64": "${{ env.RELEASE_VERSION }}",
264- "gitforge -darwin-arm64": "${{ env.RELEASE_VERSION }}",
265- "gitforge -windows-x64": "${{ env.RELEASE_VERSION }}",
266- "gitforge -windows-arm64": "${{ env.RELEASE_VERSION }}"
261+ "gitcraft -linux-x64": "${{ env.RELEASE_VERSION }}",
262+ "gitcraft -linux-arm64": "${{ env.RELEASE_VERSION }}",
263+ "gitcraft -darwin-x64": "${{ env.RELEASE_VERSION }}",
264+ "gitcraft -darwin-arm64": "${{ env.RELEASE_VERSION }}",
265+ "gitcraft -windows-x64": "${{ env.RELEASE_VERSION }}",
266+ "gitcraft -windows-arm64": "${{ env.RELEASE_VERSION }}"
267267 },
268268 "files": ["bin/"],
269269 "engines": {
@@ -273,7 +273,7 @@ jobs:
273273 EOF
274274
275275 # Create the smart wrapper
276- cat > gitforge -unified/bin/gitforge << 'EOF'
276+ cat > gitcraft -unified/bin/gitcraft << 'EOF'
277277 #!/usr/bin/env node
278278
279279 const { execFileSync } = require('child_process');
@@ -286,35 +286,35 @@ jobs:
286286 let packageName;
287287 if (platform === 'win32') {
288288 if (arch === 'arm64') {
289- packageName = 'gitforge -windows-arm64';
289+ packageName = 'gitcraft -windows-arm64';
290290 } else {
291- packageName = 'gitforge -windows-x64';
291+ packageName = 'gitcraft -windows-x64';
292292 }
293293 } else if (platform === 'darwin') {
294- packageName = arch === 'arm64' ? 'gitforge -darwin-arm64' : 'gitforge -darwin-x64';
294+ packageName = arch === 'arm64' ? 'gitcraft -darwin-arm64' : 'gitcraft -darwin-x64';
295295 } else if (platform === 'linux') {
296- packageName = arch === 'arm64' ? 'gitforge -linux-arm64' : 'gitforge -linux-x64';
296+ packageName = arch === 'arm64' ? 'gitcraft -linux-arm64' : 'gitcraft -linux-x64';
297297 } else {
298298 console.error(`Unsupported platform: ${platform}-${arch}`);
299299 process.exit(1);
300300 }
301301
302302 try {
303303 const pkgPath = require.resolve(`${packageName}/package.json`);
304- const binPath = path.join(path.dirname(pkgPath), 'bin', platform === 'win32' ? 'gitforge .exe' : 'gitforge ');
304+ const binPath = path.join(path.dirname(pkgPath), 'bin', platform === 'win32' ? 'gitcraft .exe' : 'gitcraft ');
305305 execFileSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
306306 } catch (err) {
307307 console.error(`Platform-specific package not found: ${packageName}`);
308308 console.error(`Install it directly:`);
309309 console.error(` npm install -g ${packageName}`);
310310 console.error(` OR`);
311- console.error(` npm install -g gitforge -${platform}-${arch}`);
311+ console.error(` npm install -g gitcraft -${platform}-${arch}`);
312312 process.exit(1);
313313 }
314314 EOF
315315
316- chmod +x gitforge -unified/bin/gitforge
317- cd gitforge -unified
316+ chmod +x gitcraft -unified/bin/gitcraft
317+ cd gitcraft -unified
318318 npm publish
319319 env :
320320 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
@@ -333,9 +333,9 @@ jobs:
333333 VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
334334
335335 # Get release assets
336- LINUX_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge -linux-x64-glibc"
337- DARWIN_ARM_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge -darwin-arm64"
338- DARWIN_X64_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitforge -darwin-x64"
336+ LINUX_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft -linux-x64-glibc"
337+ DARWIN_ARM_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft -darwin-arm64"
338+ DARWIN_X64_URL="https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/gitcraft -darwin-x64"
339339
340340 # Calculate checksums
341341 wget -q $LINUX_URL -O linux-binary
@@ -350,7 +350,7 @@ jobs:
350350 cd homebrew-tap
351351
352352 # Create/update formula
353- cat > Formula/gitforge .rb << EOF
353+ cat > Formula/gitcraft .rb << EOF
354354 class GhTemplates < Formula
355355 desc "GitHub Templates CLI tool"
356356 homepage "https://github.com/${{ github.repository }}"
@@ -369,18 +369,18 @@ jobs:
369369 sha256 "$LINUX_SHA"
370370 end
371371 def install
372- bin.install "gitforge "
372+ bin.install "gitcraft "
373373 end
374374
375375 test do
376- system "#{bin}/gitforge ", "--version"
376+ system "#{bin}/gitcraft ", "--version"
377377 end
378378 end
379379 EOF
380380
381381 # Commit and push
382382 git config user.name "github-actions[bot]"
383383 git config user.email "github-actions[bot]@users.noreply.github.com"
384- git add Formula/gitforge .rb
385- git commit -m "Update gitforge to $VERSION"
384+ git add Formula/gitcraft .rb
385+ git commit -m "Update gitcraft to $VERSION"
386386 git push https://x-access-token:${{ secrets.HOMEBREW_GITHUB_TOKEN }}@github.com/rafaeljohn9/homebrew-tap.git
0 commit comments