mirror of
https://github.com/video-dev/hls.js.git
synced 2026-05-17 13:30:38 +00:00
79a81e3771
- Automatically publish a new NPM package when a new git tag is pushed - Create a draft github release and add the build files as attachments
21 lines
477 B
JavaScript
Executable File
21 lines
477 B
JavaScript
Executable File
'use strict';
|
|
|
|
const packageJson = require('../package.json');
|
|
|
|
try {
|
|
if (versionPublished()) {
|
|
console.log('published');
|
|
} else {
|
|
console.log('not published');
|
|
}
|
|
} catch(e) {
|
|
console.error(e);
|
|
process.exit(1);
|
|
}
|
|
process.exit(0);
|
|
|
|
function versionPublished() {
|
|
// npm view returns empty string if package doesn't exist
|
|
return !!require('child_process').execSync('npm view ' + packageJson.name + '@' + packageJson.version + ' --json').toString().trim();
|
|
}
|