Skip to content

Commit

Permalink
Revert "Merge pull request #813 from GitTools/bug/730"
Browse files Browse the repository at this point in the history
This reverts commit 364926b.
  • Loading branch information
arturcic committed Mar 11, 2023
1 parent ae4777b commit b73575f
Show file tree
Hide file tree
Showing 28 changed files with 56 additions and 91 deletions.
2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/addasset/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/close/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/create/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/discard/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/open/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/publish/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/azure/gitreleasemanager/setup/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/azure/gitversion/execute/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/azure/gitversion/setup/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/addasset/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/close/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/create/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/discard/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/open/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/publish/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/github/gitreleasemanager/setup/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/github/gitversion/execute/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/github/gitversion/setup/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/addasset/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/close/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/create/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/discard/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/open/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/publish/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mock/gitreleasemanager/setup/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/mock/gitversion/execute/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions dist/mock/gitversion/setup/bundle.js

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions src/tasks/gitversion/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ export async function run() {
const settings: GitVersionSettings = settingsProvider.getGitVersionSettings()

const result = await gitVersionTool.run(settings)
const { stdout } = result
const jsonOutput = stdout.substring(stdout.lastIndexOf('{'), stdout.lastIndexOf('}') + 1)

const gitversion = JSON.parse(jsonOutput) as GitVersionOutput
gitVersionTool.writeGitVersionToAgent(gitversion)

if (result.code === 0) {
buildAgent.setSucceeded('GitVersion executed successfully', true)
const { stdout } = result

if (stdout.lastIndexOf('{') === -1 || stdout.lastIndexOf('}') === -1) {
buildAgent.setFailed('GitVersion output is not valid JSON', true)
} else {
const jsonOutput = stdout.substring(stdout.lastIndexOf('{'), stdout.lastIndexOf('}') + 1)

const gitversion = JSON.parse(jsonOutput) as GitVersionOutput
gitVersionTool.writeGitVersionToAgent(gitversion)
}
} else {
buildAgent.setFailed(result.error.message, true)
}
Expand Down

0 comments on commit b73575f

Please sign in to comment.