diff --git a/.vscode/settings.json b/.vscode/settings.json index a6b8485..653dd26 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,5 +49,6 @@ "titleBar.activeForeground": "#e7e7e7", "titleBar.inactiveBackground": "#1857a499", "titleBar.inactiveForeground": "#e7e7e799" - } + }, + "editor.experimental.stickyScroll.enabled": true } diff --git a/package.json b/package.json index da43b8b..03339a9 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,13 @@ "name": "vscode-gitflow", "displayName": "Git Flow", "description": "Git-Flow support for VS Code", - "version": "1.3.11", + "version": "1.3.12", "engines": { "vscode": "^1.64.0" }, + "sponsor": { + "url": "https://www.paypal.com/donate/?hosted_button_id=UTU4EMPLLLX54" + }, "publisher": "Serhioromano", "author": "Sergey Romanov", "preview": true, @@ -24,8 +27,12 @@ "hot fix", "support", "version", + "version manager", "versions", - "versioning" + "versioning", + "DevOps", + "CI/CD", + "SCM" ], "categories": [ "Other", diff --git a/src/extension.ts b/src/extension.ts index b900777..eb0acd7 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -15,7 +15,6 @@ export function activate(context: vscode.ExtensionContext) { logger.log("Extension activate", "activate"); logger.log(rootPath, "Root"); - const util = new Util(rootPath, logger); let statBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 10); statBar.command = "gitflow.quickPick"; @@ -23,6 +22,9 @@ export function activate(context: vscode.ExtensionContext) { statBar.tooltip = "Show Git Flow Quick Pick menu"; statBar.show(); context.subscriptions.push(statBar); + + + const util = new Util(rootPath, logger, statBar); const viewBranches = new TreeViewBranches(util); const a = vscode.window.createTreeView("gitflowExplorer", { diff --git a/src/lib/Util.ts b/src/lib/Util.ts index 25b3c1a..b25f875 100644 --- a/src/lib/Util.ts +++ b/src/lib/Util.ts @@ -14,7 +14,7 @@ type CmdResult = { export class Util { public path: string = ''; public flowPath: string = ''; - constructor(public workspaceRoot: string, private logger: Logger) { + constructor(public workspaceRoot: string, private logger: Logger, public sb: vscode.StatusBarItem) { this.path = vscode.workspace.getConfiguration('git').get('path') || ""; if (this.path.trim().length === 0) { const gitExtension = vscode.extensions.getExtension("vscode.git")!.exports; @@ -61,11 +61,14 @@ export class Util { if (this.path.trim().length === 0) { return ""; } + this.sb.text = "$(sync~spin) Git Flow in progress..."; try { let out = execSync(cmd, { cwd: this.workspaceRoot }).toString(); this.logger.log(out, cmd); + this.sb.text = "$(list-flat) Git Flow"; return out; } catch (e) { + this.sb.text = "$(list-flat) Git Flow"; this.logger.log(`ERROR: ${e}`, cmd, LogLevels.error); vscode.window.showErrorMessage(`Error executing: ${cmd} : ${e}`); return "" + e; @@ -77,9 +80,11 @@ export class Util { if (this.path.trim().length === 0) { return; } + this.sb.text = "$(sync~spin) Git Flow in progress..."; exec( cmd, { cwd: this.workspaceRoot, }, (err, stdout, stderr) => { + this.sb.text = "$(list-flat) Git Flow"; if (err) { vscode.window.showErrorMessage(`Error executing: ${cmd} : ${err}`); this.logger.log(`${err} ${stderr}`, cmd, LogLevels.error); @@ -113,7 +118,7 @@ export class Util { return false; } - if (this.execSync(`${this.flowPath} log`).toLowerCase().search("is not a git command") !== -1) { + if (this.execSync(`${this.flowPath} status`).toLowerCase().search("is not a git command") !== -1) { let installLink = "Install"; vscode.window .showWarningMessage("To use Git Flow extension please install Git flow (AVH).", installLink)