Skip to content

Commit

Permalink
chore(packaging): fix deb packaging (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
olamothe authored Mar 1, 2021
1 parent 5f5c69d commit 8598daa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build binaries
on:
release:
types: [published]

jobs:
package:
name: Package for ${{ matrix.pack-command }}
Expand All @@ -17,6 +18,9 @@ jobs:
- os: ubuntu-latest
pack-command: win
additional-install: sudo apt-get install nsis p7zip-full -y
- os: ubuntu-latest
pack-command: deb
additional-install: echo "no additional install"

steps:
- uses: actions/checkout@v2
Expand All @@ -29,7 +33,7 @@ jobs:
run: ${{ matrix.additional-install }}
- name: Create package
working-directory: ./packages/cli
run: npx @oclif/dev-cli pack:${{ matrix.pack-command }}
run: ./node_modules/@oclif/dev-cli/bin/run pack:${{ matrix.pack-command }}
- name: Upload binaries
uses: svenstaro/upload-release-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"@coveo/cra-template": "^0.3.0",
"@oclif/dev-cli": "^1",
"@oclif/dev-cli": "^1.26.0",
"@oclif/test": "^1",
"@types/fs-extra": "^9.0.6",
"@types/node": "^10",
Expand Down
15 changes: 15 additions & 0 deletions packages/cli/patches/@oclif+dev-cli+1.26.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/node_modules/@oclif/dev-cli/lib/commands/pack/deb.js b/node_modules/@oclif/dev-cli/lib/commands/pack/deb.js
index 885416e..deb28c3 100644
--- a/node_modules/@oclif/dev-cli/lib/commands/pack/deb.js
+++ b/node_modules/@oclif/dev-cli/lib/commands/pack/deb.js
@@ -73,8 +73,8 @@ class PackDeb extends command_1.Command {
await qq.write([workspace, 'DEBIAN/control'], scripts.control(buildConfig, debArch(arch)));
await qq.chmod([workspace, 'usr/lib', config.dirname, 'bin', config.bin], 0o755);
await qq.x(`ln -s "../lib/${config.dirname}/bin/${config.bin}" "${workspace}/usr/bin/${config.bin}"`);
- await qq.x(`chown -R root "${workspace}"`);
- await qq.x(`chgrp -R root "${workspace}"`);
+ await qq.x(`sudo chown -R root "${workspace}"`);
+ await qq.x(`sudo chgrp -R root "${workspace}"`);
await qq.x(`dpkg --build "${workspace}" "${qq.join(dist, `${versionedDebBase}.deb`)}"`);
};
const arches = _.uniq(buildConfig.targets

0 comments on commit 8598daa

Please sign in to comment.