signing script update
This commit is contained in:
1 parent
03e08c99c6
commit
8975861615
4 files changed
+33
-2
No files matched your search
+3
-1
@@ -43,6 +43,8 @@ These are mostly the steps when releasing a new version:
|
|||||||
For releasing to the store (when needed), this is done following a Playlet lib release:
|
For releasing to the store (when needed), this is done following a Playlet lib release:
|
||||||
|
|
||||||
- Switch to main branch and pull changes - **match commit corresponding to the release.**
|
- Switch to main branch and pull changes - **match commit corresponding to the release.**
|
||||||
- `npm run build:release`
|
- `npm run build:release:ci`
|
||||||
|
- This makes sure to have a valid app in the staging folder
|
||||||
|
- `npm run sign-released-package`
|
||||||
- This should create the signed package under `release/playlet.pkg`
|
- This should create the signed package under `release/playlet.pkg`
|
||||||
- Upload to dashboard, and schedule a release (takes a couple of days)
|
- Upload to dashboard, and schedule a release (takes a couple of days)
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
"version-sync": "node tools/version-sync.js",
|
"version-sync": "node tools/version-sync.js",
|
||||||
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
"manifest-git-hash": "node tools/update-manifest-git-hash.js",
|
||||||
"sign-package": "node tools/sign-package.js",
|
"sign-package": "node tools/sign-package.js",
|
||||||
|
"sign-released-package": "node tools/sign-released-package.js",
|
||||||
"screenshot": "node tools/screenshot.js",
|
"screenshot": "node tools/screenshot.js",
|
||||||
"profile-sync": "node tools/profile-sync.js",
|
"profile-sync": "node tools/profile-sync.js",
|
||||||
"generate-sponsorblock-config": "node tools/generate-sponsorblock-config.js",
|
"generate-sponsorblock-config": "node tools/generate-sponsorblock-config.js",
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const options = {
|
|||||||
outDir: 'release',
|
outDir: 'release',
|
||||||
outFile: 'playlet.zip',
|
outFile: 'playlet.zip',
|
||||||
failOnCompileError: true,
|
failOnCompileError: true,
|
||||||
stagingDir: 'dist/build/playlet-app',
|
stagingDir: 'build/playlet-app',
|
||||||
retainStagingDir: true,
|
retainStagingDir: true,
|
||||||
signingPassword: config.ROKU_SIGN_PASSWORD,
|
signingPassword: config.ROKU_SIGN_PASSWORD,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
// Description: pulls the release zip from github, signs it and retrieves it from the Roku device
|
||||||
|
|
||||||
|
const shell = require('shelljs');
|
||||||
|
|
||||||
|
if (!shell.which('git')) {
|
||||||
|
shell.echo('Sorry, this script requires git');
|
||||||
|
shell.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
shell.exec('git fetch --tags --force');
|
||||||
|
|
||||||
|
// get current commit hash
|
||||||
|
const gitCommitHash = shell.exec('git rev-parse HEAD').stdout.trim();
|
||||||
|
|
||||||
|
// get current tag
|
||||||
|
const gitTag = shell.exec(`git describe --tags ${gitCommitHash} --abbrev=0`).stdout.trim();
|
||||||
|
|
||||||
|
const expectedGitTag = `v${require('../package.json').version}`;
|
||||||
|
if (gitTag !== expectedGitTag) {
|
||||||
|
console.error(`Expected git tag ${expectedGitTag} but found ${gitTag}. Signing anyway...`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// download playlet.zip from github
|
||||||
|
const zipUrl = `https://github.com/iBicha/playlet/releases/download/${gitTag}/playlet.zip`
|
||||||
|
shell.exec(`curl -L -o release/playlet.zip "${zipUrl}"`);
|
||||||
|
|
||||||
|
// sign the package
|
||||||
|
shell.exec('node tools/sign-package.js');
|
||||||
Reference in new issue
Block a user