mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Merge branch 'ashutoshdhundhara-git-tag'
This commit is contained in:
@@ -681,6 +681,18 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
async tag(name: string, message?: string): Promise<void> {
|
||||
let args = ['tag'];
|
||||
|
||||
if (message) {
|
||||
args = [...args, '-a', name, '-m', message];
|
||||
} else {
|
||||
args = [...args, name];
|
||||
}
|
||||
|
||||
await this.run(args);
|
||||
}
|
||||
|
||||
async clean(paths: string[]): Promise<void> {
|
||||
const pathsByGroup = groupBy(paths, p => path.dirname(p));
|
||||
const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]);
|
||||
@@ -790,13 +802,17 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
async push(remote?: string, name?: string, setUpstream: boolean = false): Promise<void> {
|
||||
async push(remote?: string, name?: string, setUpstream: boolean = false, tags = false): Promise<void> {
|
||||
const args = ['push'];
|
||||
|
||||
if (setUpstream) {
|
||||
args.push('-u');
|
||||
}
|
||||
|
||||
if (tags) {
|
||||
args.push('--tags');
|
||||
}
|
||||
|
||||
if (remote) {
|
||||
args.push(remote);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user