Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(packaging): fix deb packaging #57

Merged
merged 7 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you tried sudo this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's not the problem.

- 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