mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Make commit id an argument for the build publish script. (#536)
* Make commit id an argument for the build publish script. * Make commit an optional argument for publish script.
This commit is contained in:
@@ -14,8 +14,8 @@ import * as mime from 'mime';
|
|||||||
import * as minimist from 'minimist';
|
import * as minimist from 'minimist';
|
||||||
import { DocumentClient, NewDocument } from 'documentdb';
|
import { DocumentClient, NewDocument } from 'documentdb';
|
||||||
|
|
||||||
if (process.argv.length < 6) {
|
if (process.argv.length < 9) {
|
||||||
console.error('Usage: node publish.js <product> <platform> <type> <name> <version> <commit> <is_update> <file>');
|
console.error('Usage: node publish.js <product_quality> <platform> <file_type> <file_name> <version> <is_update> <file> [commit_id]');
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,8 +263,10 @@ function main(): void {
|
|||||||
boolean: ['upload-only']
|
boolean: ['upload-only']
|
||||||
});
|
});
|
||||||
|
|
||||||
const [quality, platform, type, name, version, _isUpdate, file] = opts._;
|
let [quality, platform, type, name, version, _isUpdate, file, commit] = opts._;
|
||||||
const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
|
if (!commit) {
|
||||||
|
commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
|
||||||
|
}
|
||||||
|
|
||||||
publish(commit, quality, platform, type, name, version, _isUpdate, file, opts).catch(err => {
|
publish(commit, quality, platform, type, name, version, _isUpdate, file, opts).catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user