Compare commits
411 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c22f7729ae | ||
|
|
637e3919e3 | ||
|
|
295b66497e | ||
|
|
49d61b9dc1 | ||
|
|
90ad7ccaef | ||
|
|
d1443aa6c4 | ||
|
|
86f7bb0d14 | ||
|
|
224bd6fbc7 | ||
|
|
03651040cf | ||
|
|
018bab2bb5 | ||
|
|
28e6c84e95 | ||
|
|
7e694802e5 | ||
|
|
d1b1a68ea7 | ||
|
|
113c0eff35 | ||
|
|
6cb16e308c | ||
|
|
ed09efff19 | ||
|
|
2389aedf77 | ||
|
|
f9d87cf153 | ||
|
|
e93d76d060 | ||
|
|
1352a3019b | ||
|
|
865b52d60d | ||
|
|
1754c1b840 | ||
|
|
219fecb41b | ||
|
|
629337911b | ||
|
|
2f9911e27e | ||
|
|
2c1dea98d9 | ||
|
|
e6f9766442 | ||
|
|
4f534ce106 | ||
|
|
2f675e49c0 | ||
|
|
af2c26cb69 | ||
|
|
b1cb52687b | ||
|
|
599f8a68c2 | ||
|
|
70b7598141 | ||
|
|
d4a734be23 | ||
|
|
dbd7005e91 | ||
|
|
a748dc5f6b | ||
|
|
01aae6cb15 | ||
|
|
358c2c3428 | ||
|
|
c1d1b68d3a | ||
|
|
cda7b82117 | ||
|
|
529849d235 | ||
|
|
d91136f75c | ||
|
|
2dbf79abb4 | ||
|
|
21c221544f | ||
|
|
4e862f279a | ||
|
|
7e3444f4eb | ||
|
|
253a08ab20 | ||
|
|
80dd8c6614 | ||
|
|
2a7eef751a | ||
|
|
091a0a0508 | ||
|
|
ddc8a6fed1 | ||
|
|
359cd77ee8 | ||
|
|
c3e86a5991 | ||
|
|
777814078d | ||
|
|
f5e559ec68 | ||
|
|
471db7407e | ||
|
|
07ac8fd3d7 | ||
|
|
f9052ac398 | ||
|
|
ebc5a9b8b8 | ||
|
|
9e8a9c74a7 | ||
|
|
bdf6f4f4f4 | ||
|
|
239f9cde5f | ||
|
|
b70ac9eb92 | ||
|
|
b1c0161229 | ||
|
|
abda0b29c7 | ||
|
|
27da9f0a8f | ||
|
|
93745196a8 | ||
|
|
ab060afca2 | ||
|
|
8851ced77d | ||
|
|
ae99598529 | ||
|
|
e58c159558 | ||
|
|
fa4cbb910b | ||
|
|
5be0b93ebc | ||
|
|
e89562a503 | ||
|
|
d44a9c0eda | ||
|
|
43deb9b5f4 | ||
|
|
171afd24f4 | ||
|
|
da4adc22ba | ||
|
|
b1a2ae3dfc | ||
|
|
aabced21c8 | ||
|
|
5eb434f02d | ||
|
|
c4fcf4fa8d | ||
|
|
ceb7c13510 | ||
|
|
afcea8f5f6 | ||
|
|
8bd3b35494 | ||
|
|
8ac4e01c21 | ||
|
|
41cb436657 | ||
|
|
3cffae28da | ||
|
|
bebba89ffa | ||
|
|
b186c312bc | ||
|
|
e5b8570351 | ||
|
|
2ad2585e5e | ||
|
|
34759fcf86 | ||
|
|
78620ea5b9 | ||
|
|
a3a33f41ee | ||
|
|
bc0ba743d4 | ||
|
|
7ff479875b | ||
|
|
732774f45b | ||
|
|
0f23ca3763 | ||
|
|
fd0e9127e9 | ||
|
|
ab1f693bb2 | ||
|
|
261b95233f | ||
|
|
71beb061d8 | ||
|
|
0c289d0afe | ||
|
|
8e77e7bf98 | ||
|
|
e06fd22089 | ||
|
|
02ca90079d | ||
|
|
e81e608d3a | ||
|
|
9ce74fc069 | ||
|
|
a4df062200 | ||
|
|
7a2897ff3b | ||
|
|
9e61b6c6fa | ||
|
|
78eea2404c | ||
|
|
6d6de4e74a | ||
|
|
28489a6e8b | ||
|
|
1cf15e373e | ||
|
|
f391f58a80 | ||
|
|
c8427ece0f | ||
|
|
9200b387f9 | ||
|
|
c64a6a8172 | ||
|
|
ec09be5fcc | ||
|
|
f032284e48 | ||
|
|
ae36a4e6c2 | ||
|
|
2d231bb1fc | ||
|
|
198b8352dc | ||
|
|
9dd2999c4e | ||
|
|
5559703cfa | ||
|
|
1b4111c853 | ||
|
|
2a5e73e924 | ||
|
|
db1da7956f | ||
|
|
dc7c0bc15b | ||
|
|
213fa7b0ea | ||
|
|
6899b3b6a6 | ||
|
|
cd69c72d3d | ||
|
|
e14f1325aa | ||
|
|
bb4dbc7937 | ||
|
|
c48cb85acb | ||
|
|
e07328c594 | ||
|
|
46620b80b6 | ||
|
|
83a1614f2c | ||
|
|
ebb10d63bf | ||
|
|
7a786a5b0e | ||
|
|
c1601863b1 | ||
|
|
d98266c7b4 | ||
|
|
6118964f10 | ||
|
|
ed08d7050c | ||
|
|
32abb6db06 | ||
|
|
10253d3290 | ||
|
|
06d7b87d52 | ||
|
|
361f1d2cf1 | ||
|
|
9bda1cf33b | ||
|
|
fa6f81a896 | ||
|
|
6d2a771e40 | ||
|
|
5bf97605b6 | ||
|
|
cb5e9d0063 | ||
|
|
9371cb53e3 | ||
|
|
07a7cb455b | ||
|
|
9231b0cf62 | ||
|
|
84922eda31 | ||
|
|
1147644971 | ||
|
|
d65e9ba800 | ||
|
|
21f7c14d69 | ||
|
|
8ea0f5719e | ||
|
|
4c76e58b8c | ||
|
|
1b362ded00 | ||
|
|
c74db776af | ||
|
|
1fdc46c379 | ||
|
|
e3f7ace591 | ||
|
|
7a1c540e1c | ||
|
|
3bbb217a79 | ||
|
|
9d1c6e7f6a | ||
|
|
d735be2eeb | ||
|
|
bd2621313f | ||
|
|
6581689542 | ||
|
|
fced29db16 | ||
|
|
2f2c3463ed | ||
|
|
1bd3ac6b26 | ||
|
|
c63c7701e8 | ||
|
|
1052ead994 | ||
|
|
823370cbf3 | ||
|
|
fbf1bceba1 | ||
|
|
ab9de85d65 | ||
|
|
7e5b13b5f2 | ||
|
|
23066aa63f | ||
|
|
159ed188f6 | ||
|
|
b6c7388d8b | ||
|
|
74c0b8a1a4 | ||
|
|
f562a29213 | ||
|
|
31e312b4a0 | ||
|
|
fb2979dcc7 | ||
|
|
698b8f033e | ||
|
|
702d218a1b | ||
|
|
2af96fb4dc | ||
|
|
58f49ded64 | ||
|
|
ffcc5b0f5f | ||
|
|
4290176ff6 | ||
|
|
36f37a22e5 | ||
|
|
27c2112de8 | ||
|
|
9e1924a5de | ||
|
|
af47b96e59 | ||
|
|
4fa084c099 | ||
|
|
7af641962b | ||
|
|
52d686d4ac | ||
|
|
cd339aee5a | ||
|
|
d5164d35f4 | ||
|
|
64f9607203 | ||
|
|
857ddd1e1d | ||
|
|
3674255dde | ||
|
|
0ae24f6911 | ||
|
|
7acba1eb44 | ||
|
|
064e6da4da | ||
|
|
923117f72a | ||
|
|
c10331ebe4 | ||
|
|
064b5c66c2 | ||
|
|
0778c62d58 | ||
|
|
96c9a3249f | ||
|
|
5880c950d3 | ||
|
|
7a2b40535c | ||
|
|
3251a1504c | ||
|
|
29a938cabb | ||
|
|
cc6ec69943 | ||
|
|
2c5af54fdb | ||
|
|
0a3afcc8d0 | ||
|
|
0f683380cf | ||
|
|
b82f8cc312 | ||
|
|
2d818eba96 | ||
|
|
2a4bc26815 | ||
|
|
4796828fd7 | ||
|
|
fbffce6ad4 | ||
|
|
4685fb9970 | ||
|
|
7e9d8c3dea | ||
|
|
03fdd4079c | ||
|
|
cd94665078 | ||
|
|
a7517c431b | ||
|
|
5eeb590fb3 | ||
|
|
bda8be9b78 | ||
|
|
68ebd9ac2b | ||
|
|
7f856e2836 | ||
|
|
c59159991e | ||
|
|
6cfd874bb0 | ||
|
|
7d811ad979 | ||
|
|
b09636d2aa | ||
|
|
2483451818 | ||
|
|
3a3228dbd4 | ||
|
|
59df2263c9 | ||
|
|
90ed98fe90 | ||
|
|
e2a0a98d0d | ||
|
|
beff769a0a | ||
|
|
561a033cde | ||
|
|
f7e58105a3 | ||
|
|
8fd86bc975 | ||
|
|
9f20fd680f | ||
|
|
d90c71ad9e | ||
|
|
26e07b2073 | ||
|
|
45cb672da2 | ||
|
|
850ed98ab5 | ||
|
|
4791057296 | ||
|
|
ab0db79939 | ||
|
|
2066a451dc | ||
|
|
226c68eed2 | ||
|
|
f5e2af4aef | ||
|
|
e9a249bf95 | ||
|
|
f189de334f | ||
|
|
0bd660e284 | ||
|
|
4cff8b7a7f | ||
|
|
79e35dcb78 | ||
|
|
fbf0b14031 | ||
|
|
23e93871ca | ||
|
|
4e165ee395 | ||
|
|
b70b886620 | ||
|
|
f5ecda8793 | ||
|
|
d97d38d4db | ||
|
|
187323cd9f | ||
|
|
18fb7852c1 | ||
|
|
34118b9a5b | ||
|
|
9635ee3996 | ||
|
|
6c777befe5 | ||
|
|
d0f294eac8 | ||
|
|
0714f38d99 | ||
|
|
7a31ebd2e5 | ||
|
|
9884a236d3 | ||
|
|
73bf015789 | ||
|
|
53f64107be | ||
|
|
4e6c9eed21 | ||
|
|
6eea127057 | ||
|
|
057afaba13 | ||
|
|
fcc6fce705 | ||
|
|
866e02625e | ||
|
|
451642692d | ||
|
|
dedbf24cf5 | ||
|
|
ca126fb0ac | ||
|
|
e22f15fd11 | ||
|
|
5b82487fce | ||
|
|
d79df48eb2 | ||
|
|
707ee623d2 | ||
|
|
bc76111a30 | ||
|
|
6cca1e1c1e | ||
|
|
d623e0cc82 | ||
|
|
ebfb2edab7 | ||
|
|
867ed20f18 | ||
|
|
18209218be | ||
|
|
72b0f78544 | ||
|
|
66b6a35f56 | ||
|
|
21c841e996 | ||
|
|
d6129a51ec | ||
|
|
7c90d6b78f | ||
|
|
e4c7ed7ce3 | ||
|
|
dd26c068e0 | ||
|
|
fb3d393c4c | ||
|
|
c72a9b20bc | ||
|
|
9378479aee | ||
|
|
dfb84fe5de | ||
|
|
c63c61328d | ||
|
|
a2590843fe | ||
|
|
791bc30e72 | ||
|
|
b708e5ac10 | ||
|
|
df95cc793a | ||
|
|
cce79cc899 | ||
|
|
a98e7b7cb2 | ||
|
|
c51f0e285f | ||
|
|
78bb276e25 | ||
|
|
c3f05bcf0c | ||
|
|
6816602c40 | ||
|
|
093b543ec4 | ||
|
|
731429e5be | ||
|
|
184b94231d | ||
|
|
df842983a6 | ||
|
|
cf290bd735 | ||
|
|
be36024ea6 | ||
|
|
5d9eaa0581 | ||
|
|
8d23782950 | ||
|
|
7e521afd6f | ||
|
|
5366db4c30 | ||
|
|
214b876502 | ||
|
|
747d4742a3 | ||
|
|
eb5581014f | ||
|
|
aaca7df340 | ||
|
|
8a1aadd1f4 | ||
|
|
31cd132bf5 | ||
|
|
9e5d9ca06b | ||
|
|
988532840b | ||
|
|
727ca9d8e4 | ||
|
|
f23026aa7c | ||
|
|
9989ffce4d | ||
|
|
b9492677f7 | ||
|
|
4409444c4f | ||
|
|
e1bf948e90 | ||
|
|
bb89f91f54 | ||
|
|
fab8b7e835 | ||
|
|
8e3839c0a9 | ||
|
|
589c78d7bf | ||
|
|
136b96a603 | ||
|
|
66506f6b1a | ||
|
|
27f28461e4 | ||
|
|
2a60bc27e8 | ||
|
|
c25a163200 | ||
|
|
922cea0598 | ||
|
|
48fd5212af | ||
|
|
5af08e8335 | ||
|
|
fa4af7e71b | ||
|
|
a65efa338e | ||
|
|
d4c1bc5c32 | ||
|
|
f7000309bd | ||
|
|
12c80da98a | ||
|
|
a15def8cc2 | ||
|
|
4abfe18ccc | ||
|
|
fe505dc0b1 | ||
|
|
ab2d9be6de | ||
|
|
b941d96073 | ||
|
|
92d7ce7c81 | ||
|
|
cf87ceb245 | ||
|
|
5361cb4b6a | ||
|
|
2a18e62aca | ||
|
|
c62067b355 | ||
|
|
2028806a94 | ||
|
|
b4c25e0354 | ||
|
|
348f7c82e0 | ||
|
|
e59e3aa01e | ||
|
|
2ed20d7e5f | ||
|
|
77df971454 | ||
|
|
0de369f003 | ||
|
|
a0df4807b6 | ||
|
|
72b9932898 | ||
|
|
19bfbadf3b | ||
|
|
77d56accec | ||
|
|
c71ad3b613 | ||
|
|
a0c45005a6 | ||
|
|
d427d0fd9b | ||
|
|
7057f96b64 | ||
|
|
c9cae25ad3 | ||
|
|
6a6d522638 | ||
|
|
a70449f3e0 | ||
|
|
858107005c | ||
|
|
a67e527f19 | ||
|
|
d3c430aa3b | ||
|
|
bb0274c907 | ||
|
|
14b969d2fe | ||
|
|
b9ec3ece2a | ||
|
|
571aefb10b | ||
|
|
0366fbccc7 | ||
|
|
f0f5fe24cd | ||
|
|
060260acbd | ||
|
|
7842e08b66 | ||
|
|
84f93a930a | ||
|
|
a4c0dafea9 | ||
|
|
241a50fbd6 | ||
|
|
c0466a77ff | ||
|
|
1fe80c9136 | ||
|
|
e7399d48c5 | ||
|
|
56a078f8d2 | ||
|
|
66a4299298 |
47
.azure/ci.yml
Normal file
47
.azure/ci.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
trigger:
|
||||
- main
|
||||
pr:
|
||||
- main
|
||||
|
||||
variables:
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'
|
||||
INPUT_VERSIONSPEC: '5.x'
|
||||
|
||||
jobs:
|
||||
- job: build
|
||||
displayName: ''
|
||||
strategy:
|
||||
matrix:
|
||||
'ubuntu-latest':
|
||||
imageName: 'ubuntu-latest'
|
||||
'macos-latest':
|
||||
imageName: 'macos-latest'
|
||||
'windows-latest':
|
||||
imageName: 'windows-latest'
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: '0'
|
||||
- pwsh: |
|
||||
npm install
|
||||
npm run format-check
|
||||
npm run build:github
|
||||
npm run build:azure
|
||||
displayName: 'Build code'
|
||||
- pwsh: $env:INPUT_VERSIONSPEC = "$(INPUT_VERSIONSPEC)"; node ./gitversion/setup/bundle.js
|
||||
displayName: gitversion/setup
|
||||
workingDirectory: dist/azure
|
||||
- pwsh: node ./gitversion/execute/bundle.js
|
||||
name: version
|
||||
displayName: gitversion/execute
|
||||
workingDirectory: dist/azure
|
||||
- pwsh: |
|
||||
echo "FullSemVer (fullSemVer) : $(fullSemVer)"
|
||||
echo "FullSemVer (GitVersion_FullSemVer) : $(GitVersion_FullSemVer)"
|
||||
echo "FullSemVer (version.fullSemVer) : $(version.fullSemVer)"
|
||||
echo "FullSemVer (version.GitVersion_FullSemVer) : $(version.GitVersion_FullSemVer)"
|
||||
displayName: Use variables and output
|
||||
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@@ -8,6 +8,10 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -17,22 +21,47 @@ jobs:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
if: github.event_name == 'push'
|
||||
with:
|
||||
token: ${{ secrets.PUSH_GITHUB_TOKEN }}
|
||||
- uses: actions/checkout@v4
|
||||
if: github.event_name == 'pull_request'
|
||||
- name: Fetch all history for all tags and branches
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
- run: |
|
||||
npm install
|
||||
npm run format-check
|
||||
npm run build:github
|
||||
npm run build:azure
|
||||
name: Build code
|
||||
- name: Install GitVersion
|
||||
- name: gitversion/setup
|
||||
uses: ./gitversion/setup
|
||||
with:
|
||||
versionSpec: '5.x'
|
||||
- name: Use GitVersion
|
||||
- name: gitversion/execute
|
||||
id: gitversion # step id used as reference for output values
|
||||
uses: ./gitversion/execute
|
||||
- run: |
|
||||
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}"
|
||||
echo "FullSemVer (env.fullSemVer) : ${{ env.fullSemVer }}"
|
||||
echo "FullSemVer (env.GitVersion_FullSemVer) : ${{ env.GitVersion_FullSemVer }}"
|
||||
echo "FullSemVer (steps.gitversion.outputs.fullSemVer) : ${{ steps.gitversion.outputs.fullSemVer }}"
|
||||
echo "FullSemVer (steps.gitversion.outputs.GitVersion_FullSemVer) : ${{ steps.gitversion.outputs.GitVersion_FullSemVer }}"
|
||||
name: Use variables and output
|
||||
- name: Check for changes
|
||||
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push'
|
||||
id: status
|
||||
run: |
|
||||
if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT }
|
||||
- name: Rebuild dist and push
|
||||
run: |
|
||||
git add --verbose .
|
||||
git config user.name 'Artur Stolear'
|
||||
git config user.email 'artur.stolear@gmail.com'
|
||||
git commit -m 'dist update' --allow-empty
|
||||
git push --force
|
||||
if: steps.status.outputs.has_changes == '1'
|
||||
|
||||
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -3,6 +3,10 @@ on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -11,7 +15,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch all history for all tags and branches
|
||||
run: |
|
||||
git fetch --prune --unshallow
|
||||
@@ -37,11 +41,10 @@ jobs:
|
||||
$minor = "${{steps.gitversion.outputs.minor}}"
|
||||
$patch = "${{steps.gitversion.outputs.patch}}"
|
||||
|
||||
. .\dist\azure\update-version.ps1
|
||||
. .\dist\azure\update-version.ps1 # Import the functions
|
||||
update-manifest .\dist\azure\vss-extension.json -Version $version
|
||||
dir -r .\dist\**\task.json | % { update-task $_ -Major $major -Minor $minor -Patch $patch }
|
||||
|
||||
npm run publish:azure -- --token ${{ secrets.TFX_TOKEN }}
|
||||
|
||||
shell: pwsh
|
||||
name: Publish Azure extension
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ node_modules/
|
||||
*.vsix
|
||||
|
||||
.idea/
|
||||
/dist/mock/
|
||||
|
||||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"yaml.schemas": {
|
||||
"file:///c%3A/Users/Artur.Stolear/.vscode/extensions/docsmsft.docs-yaml-0.2.9/out/yaml-support/toc.schema.json": "/toc\\.yml/i",
|
||||
"https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json": "file:///d%3A/Projects/OSS/GitTools/actions/.azure/ci.yml"
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,5 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: dist/github/setup/index.js
|
||||
|
||||
10481
dist/azure/gitreleasemanager/addasset/bundle.js
vendored
10481
dist/azure/gitreleasemanager/addasset/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/addasset",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/close/bundle.js
vendored
10481
dist/azure/gitreleasemanager/close/bundle.js
vendored
File diff suppressed because one or more lines are too long
7
dist/azure/gitreleasemanager/close/task.json
vendored
7
dist/azure/gitreleasemanager/close/task.json
vendored
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/close",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/create/bundle.js
vendored
10481
dist/azure/gitreleasemanager/create/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/create",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/discard/bundle.js
vendored
10481
dist/azure/gitreleasemanager/discard/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/discard",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/open/bundle.js
vendored
10481
dist/azure/gitreleasemanager/open/bundle.js
vendored
File diff suppressed because one or more lines are too long
7
dist/azure/gitreleasemanager/open/task.json
vendored
7
dist/azure/gitreleasemanager/open/task.json
vendored
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/open",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/publish/bundle.js
vendored
10481
dist/azure/gitreleasemanager/publish/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/publish",
|
||||
|
||||
10481
dist/azure/gitreleasemanager/setup/bundle.js
vendored
10481
dist/azure/gitreleasemanager/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
7
dist/azure/gitreleasemanager/setup/task.json
vendored
7
dist/azure/gitreleasemanager/setup/task.json
vendored
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitreleasemanager/setup",
|
||||
|
||||
10462
dist/azure/gitversion/execute/bundle.js
vendored
10462
dist/azure/gitversion/execute/bundle.js
vendored
File diff suppressed because one or more lines are too long
9
dist/azure/gitversion/execute/task.json
vendored
9
dist/azure/gitversion/execute/task.json
vendored
@@ -2,7 +2,7 @@
|
||||
"id": "9013cf7f-ee8d-49f4-a39b-db244928d391",
|
||||
"name": "gitversion/execute",
|
||||
"friendlyName": "Execute GitVersion Task",
|
||||
"description": "Easy Semantic Versioning (http://semver.org) for projects using Git",
|
||||
"description": "Easy Semantic Versioning (https://semver.org) for projects using Git",
|
||||
"author": "GitTools Contributors",
|
||||
"helpMarkDown": "See the [documentation](https://gitversion.net/docs/) for help",
|
||||
"category": "Build",
|
||||
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitversion/execute",
|
||||
|
||||
10462
dist/azure/gitversion/setup/bundle.js
vendored
10462
dist/azure/gitversion/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
9
dist/azure/gitversion/setup/task.json
vendored
9
dist/azure/gitversion/setup/task.json
vendored
@@ -2,7 +2,7 @@
|
||||
"id": "a06c02ae-7b9a-4082-90dc-fe27b500e54f",
|
||||
"name": "gitversion/setup",
|
||||
"friendlyName": "Setup GitVersion Task",
|
||||
"description": "Easy Semantic Versioning (http://semver.org) for projects using Git",
|
||||
"description": "Easy Semantic Versioning (https://semver.org) for projects using Git",
|
||||
"author": "GitTools Contributors",
|
||||
"helpMarkDown": "See the [documentation](https://gitversion.net/docs/) for help",
|
||||
"category": "Build",
|
||||
@@ -12,12 +12,17 @@
|
||||
"Minor": "0",
|
||||
"Patch": "0"
|
||||
},
|
||||
"minimumAgentVersion": "2.115.0",
|
||||
"minimumAgentVersion": "2.220.0",
|
||||
"execution": {
|
||||
"Node10": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
},
|
||||
"Node20": {
|
||||
"target": "bundle.js",
|
||||
"argumentFormat": "",
|
||||
"workingDirectory": "."
|
||||
}
|
||||
},
|
||||
"instanceNameFormat": "gitversion/setup",
|
||||
|
||||
10
dist/azure/update-version.ps1
vendored
10
dist/azure/update-version.ps1
vendored
@@ -17,9 +17,9 @@ function update-task() {
|
||||
$patch
|
||||
)
|
||||
$file = Resolve-Path $file
|
||||
$jqMajor = '.version.Major=\"' + $major +'\"';
|
||||
$jqMinor = '.version.Minor=\"' + $minor +'\"';
|
||||
$jqPatch = '.version.Patch=\"' + $patch +'\"';
|
||||
$jqMajor = '.version.Major="' + $major +'"';
|
||||
$jqMinor = '.version.Minor="' + $minor +'"';
|
||||
$jqPatch = '.version.Patch="' + $patch +'"';
|
||||
Write-Host "Update task from $file to version $major.$minor.$patch"
|
||||
|
||||
Get-Content $file | jq $jqMajor | jq $jqMinor| jq $jqPatch | Set-Content $file
|
||||
@@ -36,8 +36,8 @@ function update-manifest() {
|
||||
$version
|
||||
)
|
||||
$file = Resolve-Path $file
|
||||
$jqVersion = '.version=\"' + $version +'\"';
|
||||
$jqVersion = '.version="' + $version +'"';
|
||||
Write-Host "Update manifest version to $version"
|
||||
|
||||
Get-Content $file | jq $jqVersion | Set-Content $file
|
||||
}
|
||||
}
|
||||
|
||||
8871
dist/github/gitreleasemanager/addasset/bundle.js
vendored
8871
dist/github/gitreleasemanager/addasset/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/close/bundle.js
vendored
8871
dist/github/gitreleasemanager/close/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/create/bundle.js
vendored
8871
dist/github/gitreleasemanager/create/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/discard/bundle.js
vendored
8871
dist/github/gitreleasemanager/discard/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/open/bundle.js
vendored
8871
dist/github/gitreleasemanager/open/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/publish/bundle.js
vendored
8871
dist/github/gitreleasemanager/publish/bundle.js
vendored
File diff suppressed because one or more lines are too long
8871
dist/github/gitreleasemanager/setup/bundle.js
vendored
8871
dist/github/gitreleasemanager/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
8852
dist/github/gitversion/execute/bundle.js
vendored
8852
dist/github/gitversion/execute/bundle.js
vendored
File diff suppressed because one or more lines are too long
8852
dist/github/gitversion/setup/bundle.js
vendored
8852
dist/github/gitversion/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/addasset/bundle.js
vendored
12203
dist/mock/gitreleasemanager/addasset/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/close/bundle.js
vendored
12203
dist/mock/gitreleasemanager/close/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/create/bundle.js
vendored
12203
dist/mock/gitreleasemanager/create/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/discard/bundle.js
vendored
12203
dist/mock/gitreleasemanager/discard/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/open/bundle.js
vendored
12203
dist/mock/gitreleasemanager/open/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/publish/bundle.js
vendored
12203
dist/mock/gitreleasemanager/publish/bundle.js
vendored
File diff suppressed because one or more lines are too long
12203
dist/mock/gitreleasemanager/setup/bundle.js
vendored
12203
dist/mock/gitreleasemanager/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
12085
dist/mock/gitversion/execute/bundle.js
vendored
12085
dist/mock/gitversion/execute/bundle.js
vendored
File diff suppressed because one or more lines are too long
12085
dist/mock/gitversion/setup/bundle.js
vendored
12085
dist/mock/gitversion/setup/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -46,42 +46,44 @@ additionalArguments:
|
||||
|
||||
The Execute GitVersion task creates the following job-scoped variables and multi-job output variables:
|
||||
|
||||
- GitVersion.Major
|
||||
- GitVersion.Minor
|
||||
- GitVersion.Patch
|
||||
- GitVersion.PreReleaseTag
|
||||
- GitVersion.PreReleaseTagWithDash
|
||||
- GitVersion.PreReleaseLabel
|
||||
- GitVersion.PreReleaseNumber
|
||||
- GitVersion.WeightedPreReleaseNumber
|
||||
- GitVersion.BuildMetaData
|
||||
- GitVersion.BuildMetaDataPadded
|
||||
- GitVersion.FullBuildMetaData
|
||||
- GitVersion.MajorMinorPatch
|
||||
- GitVersion.SemVer
|
||||
- GitVersion.LegacySemVer
|
||||
- GitVersion.LegacySemVerPadded
|
||||
- GitVersion.AssemblySemVer
|
||||
- GitVersion.AssemblySemFileVer
|
||||
- GitVersion.FullSemVer
|
||||
- GitVersion.InformationalVersion
|
||||
- GitVersion.BranchName
|
||||
- GitVersion.EscapedBranchName (since 5.2.0)
|
||||
- GitVersion.Sha
|
||||
- GitVersion.ShortSha
|
||||
- GitVersion.NuGetVersionV2
|
||||
- GitVersion.NuGetVersion
|
||||
- GitVersion.NuGetPreReleaseTagV2
|
||||
- GitVersion.NuGetPreReleaseTag
|
||||
- GitVersion.VersionSourceSha
|
||||
- GitVersion.CommitsSinceVersionSource
|
||||
- GitVersion.CommitsSinceVersionSourcePadded (since 5.2.0)
|
||||
- GitVersion.UncommittedChanges (since 5.5.0)
|
||||
- GitVersion.CommitDate
|
||||
- major
|
||||
- minor
|
||||
- patch
|
||||
- preReleaseTag
|
||||
- preReleaseTagWithDash
|
||||
- preReleaseLabel
|
||||
- preReleaseNumber
|
||||
- weightedPreReleaseNumber
|
||||
- buildMetaData
|
||||
- buildMetaDataPadded (removed in 6.0.0)
|
||||
- fullBuildMetaData
|
||||
- majorMinorPatch
|
||||
- semVer
|
||||
- legacySemVer (removed in 6.0.0)
|
||||
- legacySemVerPadded (removed in 6.0.0)
|
||||
- assemblySemVer
|
||||
- assemblySemFileVer
|
||||
- fullSemVer
|
||||
- informationalVersion
|
||||
- branchName
|
||||
- escapedBranchName (since 5.2.0)
|
||||
- sha
|
||||
- shortSha
|
||||
- nuGetVersionV2 (removed in 6.0.0)
|
||||
- nuGetVersion (removed in 6.0.0)
|
||||
- nuGetPreReleaseTagV2 (removed in 6.0.0)
|
||||
- nuGetPreReleaseTag (removed in 6.0.0)
|
||||
- versionSourceSha
|
||||
- commitsSinceVersionSource
|
||||
- commitsSinceVersionSourcePadded (since 5.2.0, removed in 6.0.0)
|
||||
- uncommittedChanges (since 5.5.0)
|
||||
- commitDate
|
||||
|
||||
The job-scoped variables can be accessed using the macro syntax `$(GitVersion.<variableName>)` in subsequent steps in the same job. Azure Pipelines also creates environment variables of the form `GITVERSION_<VARIABLENAME>`. See examples [5](#example-5) and [6](#example-6).
|
||||
The outputs can be accessed using the syntax `$(<id>.<outputName>)` or `$(<id>.GitVersion_<OutputName>)`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job. See example [5](#example-5).
|
||||
|
||||
The multi-job output variables can be accessed across jobs and stages, in both conditions and variables. See examples [7](#example-7) to [10](#example-10).
|
||||
The action also creates environment variables of the form `$(<outputName>)` or `$(GitVersion_<OutputName>)` for use by other steps in the same job. See example [6](#example-6).
|
||||
|
||||
The multi-job output variables can be accessed across jobs and stages, in both conditions and variables. See examples [7](#example-7) to [10](#example-10).
|
||||
|
||||
**GitVersion also automatically updates the pre-defined Build variable `Build.BuildNumber`.**
|
||||
|
||||
@@ -164,41 +166,78 @@ steps:
|
||||
# gitversion/setup@0 task omitted for brevity.
|
||||
|
||||
- task: gitversion/execute@0
|
||||
name: version # id to later be referenced
|
||||
displayName: Determine Version
|
||||
|
||||
- script: |
|
||||
echo Major: $(GitVersion.Major)
|
||||
echo Minor: $(GitVersion.Minor)
|
||||
echo Patch: $(GitVersion.Patch)
|
||||
echo PreReleaseTag: $(GitVersion.PreReleaseTag)
|
||||
echo PreReleaseTagWithDash: $(GitVersion.PreReleaseTagWithDash)
|
||||
echo PreReleaseLabel: $(GitVersion.PreReleaseLabel)
|
||||
echo PreReleaseNumber: $(GitVersion.PreReleaseNumber)
|
||||
echo WeightedPreReleaseNumber: $(GitVersion.WeightedPreReleaseNumber)
|
||||
echo BuildMetaData: $(GitVersion.BuildMetaData)
|
||||
echo BuildMetaDataPadded: $(GitVersion.BuildMetaDataPadded)
|
||||
echo FullBuildMetaData: $(GitVersion.FullBuildMetaData)
|
||||
echo MajorMinorPatch: $(GitVersion.MajorMinorPatch)
|
||||
echo SemVer: $(GitVersion.SemVer)
|
||||
echo LegacySemVer: $(GitVersion.LegacySemVer)
|
||||
echo LegacySemVerPadded: $(GitVersion.LegacySemVerPadded)
|
||||
echo AssemblySemVer: $(GitVersion.AssemblySemVer)
|
||||
echo AssemblySemFileVer: $(GitVersion.AssemblySemFileVer)
|
||||
echo FullSemVer: $(GitVersion.FullSemVer)
|
||||
echo InformationalVersion: $(GitVersion.InformationalVersion)
|
||||
echo BranchName: $(GitVersion.BranchName)
|
||||
echo EscapedBranchName: $(GitVersion.EscapedBranchName)
|
||||
echo Sha: $(GitVersion.Sha)
|
||||
echo ShortSha: $(GitVersion.ShortSha)
|
||||
echo NuGetVersionV2: $(GitVersion.NuGetVersionV2)
|
||||
echo NuGetVersion: $(GitVersion.NuGetVersion)
|
||||
echo NuGetPreReleaseTagV2: $(GitVersion.NuGetPreReleaseTagV2)
|
||||
echo NuGetPreReleaseTag: $(GitVersion.NuGetPreReleaseTag)
|
||||
echo VersionSourceSha: $(GitVersion.VersionSourceSha)
|
||||
echo CommitsSinceVersionSource: $(GitVersion.CommitsSinceVersionSource)
|
||||
echo CommitsSinceVersionSourcePadded: $(GitVersion.CommitsSinceVersionSourcePadded)
|
||||
echo UncommittedChanges: $(GitVersion.UncommittedChanges)
|
||||
echo CommitDate: $(GitVersion.CommitDate)
|
||||
- displayName: Display GitVersion outputs (step output)
|
||||
script: |
|
||||
echo "Major: $(version.major)"
|
||||
echo "Minor: $(version.minor)"
|
||||
echo "Patch: $(version.patch)"
|
||||
echo "PreReleaseTag: $(version.preReleaseTag)"
|
||||
echo "PreReleaseTagWithDash: $(version.preReleaseTagWithDash)"
|
||||
echo "PreReleaseLabel: $(version.preReleaseLabel)"
|
||||
echo "PreReleaseNumber: $(version.preReleaseNumber)"
|
||||
echo "WeightedPreReleaseNumber: $(version.weightedPreReleaseNumber)"
|
||||
echo "BuildMetaData: $(version.buildMetaData)"
|
||||
echo "BuildMetaDataPadded: $(version.buildMetaDataPadded)"
|
||||
echo "FullBuildMetaData: $(version.fullBuildMetaData)"
|
||||
echo "MajorMinorPatch: $(version.majorMinorPatch)"
|
||||
echo "SemVer: $(version.semVer)"
|
||||
echo "LegacySemVer: $(version.legacySemVer)"
|
||||
echo "LegacySemVerPadded: $(version.legacySemVerPadded)"
|
||||
echo "AssemblySemVer: $(version.assemblySemVer)"
|
||||
echo "AssemblySemFileVer: $(version.assemblySemFileVer)"
|
||||
echo "FullSemVer: $(version.fullSemVer)"
|
||||
echo "InformationalVersion: $(version.informationalVersion)"
|
||||
echo "BranchName: $(version.branchName)"
|
||||
echo "EscapedBranchName: $(version.escapedBranchName)"
|
||||
echo "Sha: $(version.sha)"
|
||||
echo "ShortSha: $(version.shortSha)"
|
||||
echo "NuGetVersionV2: $(version.nuGetVersionV2)"
|
||||
echo "NuGetVersion: $(version.nuGetVersion)"
|
||||
echo "NuGetPreReleaseTagV2: $(version.nuGetPreReleaseTagV2)"
|
||||
echo "NuGetPreReleaseTag: $(version.nuGetPreReleaseTag)"
|
||||
echo "VersionSourceSha: $(version.versionSourceSha)"
|
||||
echo "CommitsSinceVersionSource: $(version.commitsSinceVersionSource)"
|
||||
echo "CommitsSinceVersionSourcePadded: $(version.commitsSinceVersionSourcePadded)"
|
||||
echo "UncommittedChanges: $(version.uncommittedChanges)"
|
||||
echo "CommitDate: $(version.commitDate)"
|
||||
|
||||
- displayName: Display GitVersion outputs (step output with prefix)
|
||||
script: |
|
||||
echo "Major: $(version.GitVersion_Major)"
|
||||
echo "Minor: $(version.GitVersion_Minor)"
|
||||
echo "Patch: $(version.GitVersion_Patch)"
|
||||
echo "PreReleaseTag: $(version.GitVersion_PreReleaseTag)"
|
||||
echo "PreReleaseTagWithDash: $(version.GitVersion_PreReleaseTagWithDash)"
|
||||
echo "PreReleaseLabel: $(version.GitVersion_PreReleaseLabel)"
|
||||
echo "PreReleaseNumber: $(version.GitVersion_PreReleaseNumber)"
|
||||
echo "WeightedPreReleaseNumber: $(version.GitVersion_WeightedPreReleaseNumber)"
|
||||
echo "BuildMetaData: $(version.GitVersion_BuildMetaData)"
|
||||
echo "BuildMetaDataPadded: $(version.GitVersion_BuildMetaDataPadded)"
|
||||
echo "FullBuildMetaData: $(version.GitVersion_FullBuildMetaData)"
|
||||
echo "MajorMinorPatch: $(version.GitVersion_MajorMinorPatch)"
|
||||
echo "SemVer: $(version.GitVersion_SemVer)"
|
||||
echo "LegacySemVer: $(version.GitVersion_LegacySemVer)"
|
||||
echo "LegacySemVerPadded: $(version.GitVersion_LegacySemVerPadded)"
|
||||
echo "AssemblySemVer: $(version.GitVersion_AssemblySemVer)"
|
||||
echo "AssemblySemFileVer: $(version.GitVersion_AssemblySemFileVer)"
|
||||
echo "FullSemVer: $(version.GitVersion_FullSemVer)"
|
||||
echo "InformationalVersion: $(version.GitVersion_InformationalVersion)"
|
||||
echo "BranchName: $(version.GitVersion_BranchName)"
|
||||
echo "EscapedBranchName: $(version.GitVersion_EscapedBranchName)"
|
||||
echo "Sha: $(version.GitVersion_Sha)"
|
||||
echo "ShortSha: $(version.GitVersion_ShortSha)"
|
||||
echo "NuGetVersionV2: $(version.GitVersion_NuGetVersionV2)"
|
||||
echo "NuGetVersion: $(version.GitVersion_NuGetVersion)"
|
||||
echo "NuGetPreReleaseTagV2: $(version.GitVersion_NuGetPreReleaseTagV2)"
|
||||
echo "NuGetPreReleaseTag: $(version.GitVersion_NuGetPreReleaseTag)"
|
||||
echo "VersionSourceSha: $(version.GitVersion_VersionSourceSha)"
|
||||
echo "CommitsSinceVersionSource: $(version.GitVersion_CommitsSinceVersionSource)"
|
||||
echo "CommitsSinceVersionSourcePadded: $(version.GitVersion_CommitsSinceVersionSourcePadded)"
|
||||
echo "UncommittedChanges: $(version.GitVersion_UncommittedChanges)"
|
||||
echo "CommitDate: $(version.GitVersion_CommitDate)"
|
||||
```
|
||||
|
||||
### Example 6
|
||||
@@ -212,18 +251,88 @@ steps:
|
||||
- task: gitversion/execute@0
|
||||
displayName: Determine Version
|
||||
|
||||
- displayName: Display GitVersion variables (without prefix)
|
||||
script: |
|
||||
echo "Major: $(major)"
|
||||
echo "Minor: $(minor)"
|
||||
echo "Patch: $(patch)"
|
||||
echo "PreReleaseTag: $(preReleaseTag)"
|
||||
echo "PreReleaseTagWithDash: $(preReleaseTagWithDash)"
|
||||
echo "PreReleaseLabel: $(preReleaseLabel)"
|
||||
echo "PreReleaseNumber: $(preReleaseNumber)"
|
||||
echo "WeightedPreReleaseNumber: $(weightedPreReleaseNumber)"
|
||||
echo "BuildMetaData: $(buildMetaData)"
|
||||
echo "BuildMetaDataPadded: $(buildMetaDataPadded)"
|
||||
echo "FullBuildMetaData: $(fullBuildMetaData)"
|
||||
echo "MajorMinorPatch: $(majorMinorPatch)"
|
||||
echo "SemVer: $(semVer)"
|
||||
echo "LegacySemVer: $(legacySemVer)"
|
||||
echo "LegacySemVerPadded: $(legacySemVerPadded)"
|
||||
echo "AssemblySemVer: $(assemblySemVer)"
|
||||
echo "AssemblySemFileVer: $(assemblySemFileVer)"
|
||||
echo "FullSemVer: $(fullSemVer)"
|
||||
echo "InformationalVersion: $(informationalVersion)"
|
||||
echo "BranchName: $(branchName)"
|
||||
echo "EscapedBranchName: $(escapedBranchName)"
|
||||
echo "Sha: $(sha)"
|
||||
echo "ShortSha: $(shortSha)"
|
||||
echo "NuGetVersionV2: $(nuGetVersionV2)"
|
||||
echo "NuGetVersion: $(nuGetVersion)"
|
||||
echo "NuGetPreReleaseTagV2: $(nuGetPreReleaseTagV2)"
|
||||
echo "NuGetPreReleaseTag: $(nuGetPreReleaseTag)"
|
||||
echo "VersionSourceSha: $(versionSourceSha)"
|
||||
echo "CommitsSinceVersionSource: $(commitsSinceVersionSource)"
|
||||
echo "CommitsSinceVersionSourcePadded: $(commitsSinceVersionSourcePadded)"
|
||||
echo "UncommittedChanges: $(uncommittedChanges)"
|
||||
echo "CommitDate: $(commitDate)"
|
||||
|
||||
- displayName: Display GitVersion variables (with prefix)
|
||||
script: |
|
||||
echo "Major: $(GitVersion_Major)"
|
||||
echo "Minor: $(GitVersion_Minor)"
|
||||
echo "Patch: $(GitVersion_Patch)"
|
||||
echo "PreReleaseTag: $(GitVersion_PreReleaseTag)"
|
||||
echo "PreReleaseTagWithDash: $(GitVersion_PreReleaseTagWithDash)"
|
||||
echo "PreReleaseLabel: $(GitVersion_PreReleaseLabel)"
|
||||
echo "PreReleaseNumber: $(GitVersion_PreReleaseNumber)"
|
||||
echo "WeightedPreReleaseNumber: $(GitVersion_WeightedPreReleaseNumber)"
|
||||
echo "BuildMetaData: $(GitVersion_BuildMetaData)"
|
||||
echo "BuildMetaDataPadded: $(GitVersion_BuildMetaDataPadded)"
|
||||
echo "FullBuildMetaData: $(GitVersion_FullBuildMetaData)"
|
||||
echo "MajorMinorPatch: $(GitVersion_MajorMinorPatch)"
|
||||
echo "SemVer: $(GitVersion_SemVer)"
|
||||
echo "LegacySemVer: $(GitVersion_LegacySemVer)"
|
||||
echo "LegacySemVerPadded: $(GitVersion_LegacySemVerPadded)"
|
||||
echo "AssemblySemVer: $(GitVersion_AssemblySemVer)"
|
||||
echo "AssemblySemFileVer: $(GitVersion_AssemblySemFileVer)"
|
||||
echo "FullSemVer: $(GitVersion_FullSemVer)"
|
||||
echo "InformationalVersion: $(GitVersion_InformationalVersion)"
|
||||
echo "BranchName: $(GitVersion_BranchName)"
|
||||
echo "EscapedBranchName: $(GitVersion_EscapedBranchName)"
|
||||
echo "Sha: $(GitVersion_Sha)"
|
||||
echo "ShortSha: $(GitVersion_ShortSha)"
|
||||
echo "NuGetVersionV2: $(GitVersion_NuGetVersionV2)"
|
||||
echo "NuGetVersion: $(GitVersion_NuGetVersion)"
|
||||
echo "NuGetPreReleaseTagV2: $(GitVersion_NuGetPreReleaseTagV2)"
|
||||
echo "NuGetPreReleaseTag: $(GitVersion_NuGetPreReleaseTag)"
|
||||
echo "VersionSourceSha: $(GitVersion_VersionSourceSha)"
|
||||
echo "CommitsSinceVersionSource: $(GitVersion_CommitsSinceVersionSource)"
|
||||
echo "CommitsSinceVersionSourcePadded: $(GitVersion_CommitsSinceVersionSourcePadded)"
|
||||
echo "UncommittedChanges: $(GitVersion_UncommittedChanges)"
|
||||
echo "CommitDate: $(GitVersion_CommitDate)"
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Pack Example
|
||||
inputs:
|
||||
command: pack
|
||||
packagesToPack: src/Example/LibExample.csproj
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: GitVersion.NuGetVersion # alternative syntax GITVERSION_NUGETVERSION (the former gets converted into the latter internally)
|
||||
versionEnvVar: GitVersion_SemVer # alternative syntax GITVERSION_SEMVER (the former gets converted into the latter internally)
|
||||
```
|
||||
|
||||
### Example 7
|
||||
|
||||
Calculate the version for the build and use the `GitVersion.BranchName` variable in a condition for starting another job.
|
||||
Calculate the version for the build and use the `GitVersion_BranchName` variable in a condition for starting another job.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -237,13 +346,13 @@ jobs:
|
||||
name: Version # the step MUST be named to access its output variables in another job.
|
||||
|
||||
- job: CreateReleaseNotes
|
||||
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion.BranchName'], 'main'))
|
||||
condition: and(succeeded(), eq(dependencies.CalculateVersion.outputs['Version.GitVersion_BranchName'], 'main'))
|
||||
dependsOn: CalculateVersion
|
||||
```
|
||||
|
||||
### Example 8
|
||||
|
||||
Calculate the version for the build and map the `GitVersion.SemVer` variable into a variable in another job.
|
||||
Calculate the version for the build and map the `GitVersion_SemVer` variable into a variable in another job.
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -258,7 +367,7 @@ jobs:
|
||||
|
||||
- job: BuildAndPack
|
||||
variables:
|
||||
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion.MajorMinorPatch'] ]
|
||||
Ver.MajorMinorPatch: $[ dependencies.CalculateVersion.outputs['Version.GitVersion_MajorMinorPatch'] ]
|
||||
```
|
||||
|
||||
### Example 9
|
||||
@@ -279,7 +388,7 @@ stages:
|
||||
name: Version # the step MUST be named to access its output variables in another stage.
|
||||
|
||||
- stage: S2
|
||||
condition: and(succeeded(), gt(dependencies.S1.outputs['CalculateVersion.Version.GitVersion.Major'], 0))
|
||||
condition: and(succeeded(), gt(dependencies.S1.outputs['CalculateVersion.Version.GitVersion_Major'], 0))
|
||||
dependsOn: S1
|
||||
```
|
||||
|
||||
@@ -304,5 +413,5 @@ stages:
|
||||
jobs:
|
||||
- job: UpdateAssemblyVersions
|
||||
variables:
|
||||
Ver.AssemblyVer: $[ stageDependencies.S1.CalculateVersion.outputs['Version.GitVersion.AssemblySemVer'] ] # Note the 'stageDependencies.<jobName>' syntax.
|
||||
Ver.AssemblyVer: $[ stageDependencies.S1.CalculateVersion.outputs['Version.GitVersion_AssemblySemVer'] ] # Note the 'stageDependencies.<jobName>' syntax.
|
||||
```
|
||||
|
||||
@@ -31,6 +31,14 @@ preferLatestVersion:
|
||||
|
||||
## Usage examples
|
||||
|
||||
In order for the gitversion to properly work you need to clone the repository with the entire history:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: 0
|
||||
```
|
||||
|
||||
### Example 1
|
||||
|
||||
Install the latest GitVersion 5 version.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/addassetv0
|
||||
- uses: gittools/actions/gitreleasemanager/addasset@v0
|
||||
name: Add asset to a release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/closev0
|
||||
- uses: gittools/actions/gitreleasemanager/close@v0
|
||||
name: Close release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/createv0
|
||||
- uses: gittools/actions/gitreleasemanager/create@0
|
||||
name: Create release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/discardv0
|
||||
- uses: gittools/actions/gitreleasemanager/discard@v0
|
||||
name: Discard release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/openv0
|
||||
- uses: gittools/actions/gitreleasemanager/open@v0
|
||||
name: Open release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/publishv0
|
||||
- uses: gittools/actions/gitreleasemanager/publish@v0
|
||||
name: Publish release with GitReleaseManager
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: gittools/actions/gitreleasemanager/setupv0
|
||||
- uses: gittools/actions/gitreleasemanager/setup@v0
|
||||
name: Install GitReleaseManager
|
||||
with:
|
||||
versionSpec: '0.10.x'
|
||||
|
||||
@@ -60,12 +60,12 @@ The Execute GitVersion action creates the following outputs:
|
||||
- preReleaseNumber
|
||||
- weightedPreReleaseNumber
|
||||
- buildMetaData
|
||||
- buildMetaDataPadded
|
||||
- buildMetaDataPadded (removed in 6.0.0)
|
||||
- fullBuildMetaData
|
||||
- majorMinorPatch
|
||||
- semVer
|
||||
- legacySemVer
|
||||
- legacySemVerPadded
|
||||
- legacySemVer (removed in 6.0.0)
|
||||
- legacySemVerPadded (removed in 6.0.0)
|
||||
- assemblySemVer
|
||||
- assemblySemFileVer
|
||||
- fullSemVer
|
||||
@@ -74,19 +74,19 @@ The Execute GitVersion action creates the following outputs:
|
||||
- escapedBranchName (since 5.2.0)
|
||||
- sha
|
||||
- shortSha
|
||||
- nuGetVersionV2
|
||||
- nuGetVersion
|
||||
- nuGetPreReleaseTagV2
|
||||
- nuGetPreReleaseTag
|
||||
- nuGetVersionV2 (removed in 6.0.0)
|
||||
- nuGetVersion (removed in 6.0.0)
|
||||
- nuGetPreReleaseTagV2 (removed in 6.0.0)
|
||||
- nuGetPreReleaseTag (removed in 6.0.0)
|
||||
- versionSourceSha
|
||||
- commitsSinceVersionSource
|
||||
- commitsSinceVersionSourcePadded (since 5.2.0)
|
||||
- commitsSinceVersionSourcePadded (since 5.2.0, removed in 6.0.0)
|
||||
- uncommittedChanges (since 5.5.0)
|
||||
- commitDate
|
||||
|
||||
The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job. See example [5](#example-5).
|
||||
The outputs can be accessed using the syntax `${{ steps.<id>.outputs.<outputName> }}` or `${{ steps.<id>.outputs.GitVersion_<OutputName> }}`, where `<id>` is the ID assigned to the step that calls the action, by subsequent steps later in the same job. See example [5](#example-5).
|
||||
|
||||
The action also creates environment variables of the form `GITVERSION_<OUTPUTNAME>` for use by other steps in the same job. See example [6](#example-6).
|
||||
The action also creates environment variables of the form `${{ env.<outputName> }}` or `${{ env.GitVersion_<OutputName> }}` for use by other steps in the same job. See example [6](#example-6).
|
||||
|
||||
The outputs can be accessed across jobs by mapping them to job outputs and referencing the job outputs using the `needs` context in dependent jobs. See examples [7](#example-7) and [8](#example-8).
|
||||
|
||||
@@ -168,10 +168,10 @@ steps:
|
||||
# gitversion/setup@v0 action omitted for brevity.
|
||||
|
||||
- name: Determine Version
|
||||
id: gitversion
|
||||
id: gitversion # id to later be referenced
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
|
||||
- name: Display GitVersion outputs
|
||||
- name: Display GitVersion outputs (step output)
|
||||
run: |
|
||||
echo "Major: ${{ steps.gitversion.outputs.major }}"
|
||||
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
|
||||
@@ -205,11 +205,46 @@ steps:
|
||||
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.commitsSinceVersionSourcePadded }}"
|
||||
echo "UncommittedChanges: ${{ steps.gitversion.outputs.uncommittedChanges }}"
|
||||
echo "CommitDate: ${{ steps.gitversion.outputs.commitDate }}"
|
||||
|
||||
- name: Display GitVersion outputs (step output with prefix)
|
||||
run: |
|
||||
echo "Major: ${{ steps.gitversion.outputs.GitVersion_Major }}"
|
||||
echo "Minor: ${{ steps.gitversion.outputs.GitVersion_Minor }}"
|
||||
echo "Patch: ${{ steps.gitversion.outputs.GitVersion_Patch }}"
|
||||
echo "PreReleaseTag: ${{ steps.gitversion.outputs.GitVersion_PreReleaseTag }}"
|
||||
echo "PreReleaseTagWithDash: ${{ steps.gitversion.outputs.GitVersion_PreReleaseTagWithDash }}"
|
||||
echo "PreReleaseLabel: ${{ steps.gitversion.outputs.GitVersion_PreReleaseLabel }}"
|
||||
echo "PreReleaseNumber: ${{ steps.gitversion.outputs.GitVersion_PreReleaseNumber }}"
|
||||
echo "WeightedPreReleaseNumber: ${{ steps.gitversion.outputs.GitVersion_WeightedPreReleaseNumber }}"
|
||||
echo "BuildMetaData: ${{ steps.gitversion.outputs.GitVersion_BuildMetaData }}"
|
||||
echo "BuildMetaDataPadded: ${{ steps.gitversion.outputs.GitVersion_BuildMetaDataPadded }}"
|
||||
echo "FullBuildMetaData: ${{ steps.gitversion.outputs.GitVersion_FullBuildMetaData }}"
|
||||
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.GitVersion_MajorMinorPatch }}"
|
||||
echo "SemVer: ${{ steps.gitversion.outputs.GitVersion_SemVer }}"
|
||||
echo "LegacySemVer: ${{ steps.gitversion.outputs.GitVersion_LegacySemVer }}"
|
||||
echo "LegacySemVerPadded: ${{ steps.gitversion.outputs.GitVersion_LegacySemVerPadded }}"
|
||||
echo "AssemblySemVer: ${{ steps.gitversion.outputs.GitVersion_AssemblySemVer }}"
|
||||
echo "AssemblySemFileVer: ${{ steps.gitversion.outputs.GitVersion_AssemblySemFileVer }}"
|
||||
echo "FullSemVer: ${{ steps.gitversion.outputs.GitVersion_FullSemVer }}"
|
||||
echo "InformationalVersion: ${{ steps.gitversion.outputs.GitVersion_InformationalVersion }}"
|
||||
echo "BranchName: ${{ steps.gitversion.outputs.GitVersion_BranchName }}"
|
||||
echo "EscapedBranchName: ${{ steps.gitversion.outputs.GitVersion_EscapedBranchName }}"
|
||||
echo "Sha: ${{ steps.gitversion.outputs.GitVersion_Sha }}"
|
||||
echo "ShortSha: ${{ steps.gitversion.outputs.GitVersion_ShortSha }}"
|
||||
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.GitVersion_NuGetVersionV2 }}"
|
||||
echo "NuGetVersion: ${{ steps.gitversion.outputs.GitVersion_NuGetVersion }}"
|
||||
echo "NuGetPreReleaseTagV2: ${{ steps.gitversion.outputs.GitVersion_NuGetPreReleaseTagV2 }}"
|
||||
echo "NuGetPreReleaseTag: ${{ steps.gitversion.outputs.GitVersion_NuGetPreReleaseTag }}"
|
||||
echo "VersionSourceSha: ${{ steps.gitversion.outputs.GitVersion_VersionSourceSha }}"
|
||||
echo "CommitsSinceVersionSource: ${{ steps.gitversion.outputs.GitVersion_CommitsSinceVersionSource }}"
|
||||
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.GitVersion_CommitsSinceVersionSourcePadded }}"
|
||||
echo "UncommittedChanges: ${{ steps.gitversion.outputs.GitVersion_UncommittedChanges }}"
|
||||
echo "CommitDate: ${{ steps.gitversion.outputs.GitVersion_CommitDate }}"
|
||||
```
|
||||
|
||||
### Example 6
|
||||
|
||||
Calculate the version for the build and display the value of the `GITVERSION_SEMVER` environment variable.
|
||||
Calculate the version for the build and display the value of the `env.GitVersion_SemVer` environment variable.
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
@@ -218,9 +253,76 @@ steps:
|
||||
- name: Determine Version
|
||||
uses: gittools/actions/gitversion/execute@v0
|
||||
|
||||
- name: Display SemVer
|
||||
|
||||
- name: Display GitVersion variables (without prefix)
|
||||
run: |
|
||||
echo "SemVer: $GITVERSION_SEMVER"
|
||||
echo "Major: ${{ env.major }}"
|
||||
echo "Minor: ${{ env.minor }}"
|
||||
echo "Patch: ${{ env.patch }}"
|
||||
echo "PreReleaseTag: ${{ env.preReleaseTag }}"
|
||||
echo "PreReleaseTagWithDash: ${{ env.preReleaseTagWithDash }}"
|
||||
echo "PreReleaseLabel: ${{ env.preReleaseLabel }}"
|
||||
echo "PreReleaseNumber: ${{ env.preReleaseNumber }}"
|
||||
echo "WeightedPreReleaseNumber: ${{ env.weightedPreReleaseNumber }}"
|
||||
echo "BuildMetaData: ${{ env.buildMetaData }}"
|
||||
echo "BuildMetaDataPadded: ${{ env.buildMetaDataPadded }}"
|
||||
echo "FullBuildMetaData: ${{ env.fullBuildMetaData }}"
|
||||
echo "MajorMinorPatch: ${{ env.majorMinorPatch }}"
|
||||
echo "SemVer: ${{ env.semVer }}"
|
||||
echo "LegacySemVer: ${{ env.legacySemVer }}"
|
||||
echo "LegacySemVerPadded: ${{ env.legacySemVerPadded }}"
|
||||
echo "AssemblySemVer: ${{ env.assemblySemVer }}"
|
||||
echo "AssemblySemFileVer: ${{ env.assemblySemFileVer }}"
|
||||
echo "FullSemVer: ${{ env.fullSemVer }}"
|
||||
echo "InformationalVersion: ${{ env.informationalVersion }}"
|
||||
echo "BranchName: ${{ env.branchName }}"
|
||||
echo "EscapedBranchName: ${{ env.escapedBranchName }}"
|
||||
echo "Sha: ${{ env.sha }}"
|
||||
echo "ShortSha: ${{ env.shortSha }}"
|
||||
echo "NuGetVersionV2: ${{ env.nuGetVersionV2 }}"
|
||||
echo "NuGetVersion: ${{ env.nuGetVersion }}"
|
||||
echo "NuGetPreReleaseTagV2: ${{ env.nuGetPreReleaseTagV2 }}"
|
||||
echo "NuGetPreReleaseTag: ${{ env.nuGetPreReleaseTag }}"
|
||||
echo "VersionSourceSha: ${{ env.versionSourceSha }}"
|
||||
echo "CommitsSinceVersionSource: ${{ env.commitsSinceVersionSource }}"
|
||||
echo "CommitsSinceVersionSourcePadded: ${{ env.commitsSinceVersionSourcePadded }}"
|
||||
echo "UncommittedChanges: ${{ env.uncommittedChanges }}"
|
||||
echo "CommitDate: ${{ env.commitDate }}"
|
||||
|
||||
- name: Display GitVersion variables (with prefix)
|
||||
run: |
|
||||
echo "Major: ${{ env.GitVersion_Major }}"
|
||||
echo "Minor: ${{ env.GitVersion_Minor }}"
|
||||
echo "Patch: ${{ env.GitVersion_Patch }}"
|
||||
echo "PreReleaseTag: ${{ env.GitVersion_PreReleaseTag }}"
|
||||
echo "PreReleaseTagWithDash: ${{ env.GitVersion_PreReleaseTagWithDash }}"
|
||||
echo "PreReleaseLabel: ${{ env.GitVersion_PreReleaseLabel }}"
|
||||
echo "PreReleaseNumber: ${{ env.GitVersion_PreReleaseNumber }}"
|
||||
echo "WeightedPreReleaseNumber: ${{ env.GitVersion_WeightedPreReleaseNumber }}"
|
||||
echo "BuildMetaData: ${{ env.GitVersion_BuildMetaData }}"
|
||||
echo "BuildMetaDataPadded: ${{ env.GitVersion_BuildMetaDataPadded }}"
|
||||
echo "FullBuildMetaData: ${{ env.GitVersion_FullBuildMetaData }}"
|
||||
echo "MajorMinorPatch: ${{ env.GitVersion_MajorMinorPatch }}"
|
||||
echo "SemVer: ${{ env.GitVersion_SemVer }}"
|
||||
echo "LegacySemVer: ${{ env.GitVersion_LegacySemVer }}"
|
||||
echo "LegacySemVerPadded: ${{ env.GitVersion_LegacySemVerPadded }}"
|
||||
echo "AssemblySemVer: ${{ env.GitVersion_AssemblySemVer }}"
|
||||
echo "AssemblySemFileVer: ${{ env.GitVersion_AssemblySemFileVer }}"
|
||||
echo "FullSemVer: ${{ env.GitVersion_FullSemVer }}"
|
||||
echo "InformationalVersion: ${{ env.GitVersion_InformationalVersion }}"
|
||||
echo "BranchName: ${{ env.GitVersion_BranchName }}"
|
||||
echo "EscapedBranchName: ${{ env.GitVersion_EscapedBranchName }}"
|
||||
echo "Sha: ${{ env.GitVersion_Sha }}"
|
||||
echo "ShortSha: ${{ env.GitVersion_ShortSha }}"
|
||||
echo "NuGetVersionV2: ${{ env.GitVersion_NuGetVersionV2 }}"
|
||||
echo "NuGetVersion: ${{ env.GitVersion_NuGetVersion }}"
|
||||
echo "NuGetPreReleaseTagV2: ${{ env.GitVersion_NuGetPreReleaseTagV2 }}"
|
||||
echo "NuGetPreReleaseTag: ${{ env.GitVersion_NuGetPreReleaseTag }}"
|
||||
echo "VersionSourceSha: ${{ env.GitVersion_VersionSourceSha }}"
|
||||
echo "CommitsSinceVersionSource: ${{ env.GitVersion_CommitsSinceVersionSource }}"
|
||||
echo "CommitsSinceVersionSourcePadded: ${{ env.GitVersion_CommitsSinceVersionSourcePadded }}"
|
||||
echo "UncommittedChanges: ${{ env.GitVersion_UncommittedChanges }}"
|
||||
echo "CommitDate: ${{ env.GitVersion_CommitDate }}"
|
||||
```
|
||||
|
||||
### Example 7
|
||||
|
||||
@@ -27,6 +27,17 @@ ignoreFailedSources:
|
||||
|
||||
## Usage examples
|
||||
|
||||
In order for the gitversion to properly work you need to clone the repository with the entire history:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
```
|
||||
|
||||
### Example 1
|
||||
|
||||
Install the latest GitVersion 5 version.
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/addasset/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/close/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/create/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/discard/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/open/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/publish/bundle.js
|
||||
inputs:
|
||||
owner:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitreleasemanager/setup/bundle.js
|
||||
inputs:
|
||||
versionSpec:
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitversion/execute/bundle.js
|
||||
inputs:
|
||||
targetPath:
|
||||
@@ -96,4 +96,4 @@ outputs:
|
||||
uncommittedChanges:
|
||||
description: 'The UncommittedChanges value'
|
||||
commitDate:
|
||||
description: 'The CommitDate value'
|
||||
description: 'The CommitDate value'
|
||||
|
||||
@@ -5,7 +5,7 @@ branding:
|
||||
color: gray-dark
|
||||
icon: git-pull-request
|
||||
runs:
|
||||
using: node16
|
||||
using: node20
|
||||
main: ../../dist/github/gitversion/setup/bundle.js
|
||||
inputs:
|
||||
versionSpec:
|
||||
|
||||
1795
package-lock.json
generated
1795
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
45
package.json
45
package.json
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "gittools-actions",
|
||||
"version": "1.0.0",
|
||||
"description": "Easy Semantic Versioning (http://semver.org) for projects using Git",
|
||||
"description": "Easy Semantic Versioning (https://semver.org) for projects using Git",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/GitTools/use-gitversion.git"
|
||||
@@ -26,35 +26,34 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.2",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"azure-pipelines-task-lib": "^3.3.1",
|
||||
"azure-pipelines-tool-lib": "^1.3.2",
|
||||
"inversify": "^6.0.1",
|
||||
"semver": "^7.3.8",
|
||||
"typed-rest-client": "^1.8.9",
|
||||
"uuid": "^9.0.0"
|
||||
"azure-pipelines-tool-lib": "^2.0.7",
|
||||
"inversify": "^6.0.2",
|
||||
"semver": "^7.6.0",
|
||||
"typed-rest-client": "^1.8.11",
|
||||
"uuid": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.15.0",
|
||||
"@types/q": "^1.5.5",
|
||||
"@types/semver": "^7.3.13",
|
||||
"@types/uuid": "^9.0.1",
|
||||
"@types/node": "^20.11.20",
|
||||
"@types/q": "^1.5.8",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"minimist": "^1.2.8",
|
||||
"prettier": "^2.8.4",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"prettier": "^3.2.5",
|
||||
"reflect-metadata": "^0.2.1",
|
||||
"replace-in-file-webpack-plugin": "^1.0.6",
|
||||
"shelljs": "^0.8.5",
|
||||
"terser-webpack-plugin": "^5.3.7",
|
||||
"tfx-cli": "^0.14.0",
|
||||
"trim-newlines": ">=4.0.2",
|
||||
"ts-loader": "^9.4.2",
|
||||
"typescript": "^4.9.5",
|
||||
"terser-webpack-plugin": "^5.3.10",
|
||||
"tfx-cli": "^0.16.0",
|
||||
"trim-newlines": ">=5.0.0",
|
||||
"ts-loader": "^9.5.1",
|
||||
"typescript": "^5.3.3",
|
||||
"underscore": ">=1.13.6",
|
||||
"validator": "^13.9.0",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
"validator": "^13.11.0",
|
||||
"webpack": "^5.90.3",
|
||||
"webpack-cli": "^5.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ class BuildAgent implements IBuildAgent {
|
||||
taskLib.setResult(taskLib.TaskResult.Succeeded, message, done)
|
||||
}
|
||||
|
||||
public exportVariable(name: string, val: string): void {
|
||||
taskLib.setVariable(name, val)
|
||||
public setVariable(name: string, value: string): void {
|
||||
taskLib.setVariable(name, value)
|
||||
}
|
||||
|
||||
public getVariable(name: string): string {
|
||||
@@ -78,7 +78,7 @@ class BuildAgent implements IBuildAgent {
|
||||
}
|
||||
|
||||
public setOutput(name: string, value: string): void {
|
||||
taskLib.setVariable(name, value)
|
||||
taskLib.setVariable(name, value, false, true)
|
||||
}
|
||||
|
||||
public getInput(input: string, required?: boolean): string {
|
||||
|
||||
@@ -110,7 +110,7 @@ class BuildAgent implements IBuildAgent {
|
||||
//
|
||||
}
|
||||
|
||||
public exportVariable(name: string, val: string): void {
|
||||
public setVariable(name: string, val: string): void {
|
||||
core.exportVariable(name, val)
|
||||
}
|
||||
|
||||
@@ -128,24 +128,12 @@ class BuildAgent implements IBuildAgent {
|
||||
|
||||
public async exec(exec: string, args: string[]): Promise<IExecResult> {
|
||||
const dotnetPath = await io.which(exec, true)
|
||||
let resultCode = 0
|
||||
let stdout = ''
|
||||
let stderr = ''
|
||||
resultCode = await exe.exec(`"${dotnetPath}"`, args, {
|
||||
listeners: {
|
||||
stderr: (data: Buffer) => {
|
||||
stderr += data.toString()
|
||||
},
|
||||
stdout: (data: Buffer) => {
|
||||
stdout += data.toString()
|
||||
}
|
||||
}
|
||||
})
|
||||
let result = await exe.getExecOutput(`"${dotnetPath}"`, args);
|
||||
return {
|
||||
code: resultCode,
|
||||
code: result.exitCode,
|
||||
error: null,
|
||||
stderr,
|
||||
stdout
|
||||
stderr: result.stderr,
|
||||
stdout: result.stdout
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +143,6 @@ class BuildAgent implements IBuildAgent {
|
||||
|
||||
public setOutput(name: string, value: string): void {
|
||||
core.setOutput(name, value)
|
||||
core.exportVariable(`GITVERSION_${name.toUpperCase()}`, value)
|
||||
}
|
||||
|
||||
public getInput(input: string, required?: boolean): string {
|
||||
|
||||
@@ -41,8 +41,8 @@ class BuildAgent implements IBuildAgent {
|
||||
console.log('setSucceeded')
|
||||
}
|
||||
|
||||
public exportVariable(name: string, val: string): void {
|
||||
console.log('exportVariable')
|
||||
public setVariable(name: string, val: string): void {
|
||||
console.log('setVariable')
|
||||
}
|
||||
|
||||
public getVariable(name: string): string {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class DotnetTool implements IDotnetTool {
|
||||
protected versionManager: IVersionManager
|
||||
private httpClient: http.HttpClient
|
||||
|
||||
private static readonly nugetRoot: string = 'https://azuresearch-usnc.nuget.org/'
|
||||
private static readonly nugetRoot: string = 'https://azuresearch-usnc.nuget.org/query'
|
||||
|
||||
constructor(@inject(TYPES.IBuildAgent) buildAgent: IBuildAgent, @inject(TYPES.IVersionManager) versionManager: IVersionManager) {
|
||||
this.buildAgent = buildAgent
|
||||
@@ -28,8 +28,8 @@ export class DotnetTool implements IDotnetTool {
|
||||
}
|
||||
|
||||
public disableTelemetry(): void {
|
||||
this.buildAgent.exportVariable('DOTNET_CLI_TELEMETRY_OPTOUT', 'true')
|
||||
this.buildAgent.exportVariable('DOTNET_NOLOGO', 'true')
|
||||
this.buildAgent.setVariable('DOTNET_CLI_TELEMETRY_OPTOUT', 'true')
|
||||
this.buildAgent.setVariable('DOTNET_NOLOGO', 'true')
|
||||
}
|
||||
|
||||
public execute(cmd: string, args: string[]): Promise<IExecResult> {
|
||||
@@ -102,7 +102,7 @@ export class DotnetTool implements IDotnetTool {
|
||||
let dotnetPath = await this.buildAgent.which('dotnet')
|
||||
dotnetPath = fs.readlinkSync(dotnetPath) || dotnetPath
|
||||
const dotnetRoot = path.dirname(dotnetPath)
|
||||
this.buildAgent.exportVariable('DOTNET_ROOT', dotnetRoot)
|
||||
this.buildAgent.setVariable('DOTNET_ROOT', dotnetRoot)
|
||||
}
|
||||
this.buildAgent.addPath(toolPath)
|
||||
|
||||
@@ -116,7 +116,7 @@ export class DotnetTool implements IDotnetTool {
|
||||
|
||||
const toolNameParam = encodeURIComponent(toolName.toLowerCase())
|
||||
const prereleaseParam = includePrerelease ? 'true' : 'false'
|
||||
const downloadPath = `${DotnetTool.nugetRoot}query?q=${toolNameParam}&prerelease=${prereleaseParam}&semVerLevel=2.0.0&take=1`
|
||||
const downloadPath = `${DotnetTool.nugetRoot}?q=${toolNameParam}&prerelease=${prereleaseParam}&semVerLevel=2.0.0&take=1`
|
||||
|
||||
const res = await this.httpClient.get(downloadPath)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface IBuildAgent {
|
||||
debug(message: string): void
|
||||
setFailed(message: string, done?: boolean): void
|
||||
setSucceeded(message: string, done?: boolean): void
|
||||
exportVariable(name: string, val: string): void
|
||||
setVariable(name: string, val: string): void
|
||||
getVariable(name: string): string
|
||||
addPath(inputPath: string): void
|
||||
which(tool: string, check?: boolean): Promise<string>
|
||||
|
||||
@@ -83,6 +83,9 @@ export class GitVersionTool extends DotnetTool implements IGitVersionTool {
|
||||
const name = this.toCamelCase(property)
|
||||
const value = gitversionOutput[property]
|
||||
this.buildAgent.setOutput(name, value)
|
||||
this.buildAgent.setOutput(`GitVersion_${name}`, value)
|
||||
this.buildAgent.setVariable(name, value)
|
||||
this.buildAgent.setVariable(`GitVersion_${name}`, value)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user