Skip to content

Commit

Permalink
pkg+esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ANGkeith committed Sep 7, 2024
1 parent c982816 commit 4fb06eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
path: ${{ env.PKG_CACHE_PATH }}
key: pkg-cache-${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run build:pkg
- run: npm run pkg-linux
- run: node src/index.js --version
- run: node pkg/out.cjs --version
- run: bin/linux/gitlab-ci-local --version
- run: bin/linux/gitlab-ci-local --help

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ tsconfig.tsbuildinfo
.DS_Store

.vscode
pkg

/.gitlab-ci.yml
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"bin": "src/index.js",
"version": "4.53.0",
"scripts": {
"pkg-linux": "pkg src/index.js --public -t node18-linux-x64 -o bin/linux/gitlab-ci-local && chmod +x bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz",
"pkg-macos": "pkg src/index.js --public -t node18-macos-x64 -o bin/macos/gitlab-ci-local && gzip -c bin/macos/gitlab-ci-local > bin/macos.gz",
"pkg-win": "pkg src/index.js --public -t node18-win-x64 -o bin/win/gitlab-ci-local && gzip -c bin/win/gitlab-ci-local.exe > bin/win.gz",
"build:pkg": "mkdir -p pkg && esbuild src/index.ts --outfile=pkg/out.cjs --bundle --platform=node --format=cjs --minify",
"pkg-linux": "pkg pkg/index.cjs --public -t node18-linux-x64 -o bin/linux/gitlab-ci-local && chmod +x bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz",
"pkg-macos": "pkg pkg/index.cjs --public -t node18-macos-x64 -o bin/macos/gitlab-ci-local && gzip -c bin/macos/gitlab-ci-local > bin/macos.gz",
"pkg-win": "pkg pkg/index.cjs --public -t node18-win-x64 -o bin/win/gitlab-ci-local && gzip -c bin/win/gitlab-ci-local.exe > bin/win.gz",
"pkg-all": "npm run pkg-linux && npm run pkg-macos && npm run pkg-win",
"pkg": "pkg",
"cleanup": "git clean -fX tests/ && git clean -fX src/",
Expand Down

0 comments on commit 4fb06eb

Please sign in to comment.