new file version style (#1767)

* Fixing FileVersion tag

* temp removing

* updating ymls passing buildnumber

* checking echo

* run_id

* fixing ymls

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
Eddy Nakamura 2021-02-01 22:02:30 -03:00 committed by GitHub
parent d0b921bb1a
commit 56b86b062f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 10 deletions

View File

@ -29,7 +29,7 @@ jobs:
run: dotnet restore
- name: dotnet build
run: dotnet build --configuration Release --no-restore -p:Deterministic=true
run: dotnet build --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
- name: dotnet pack
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build
@ -40,7 +40,7 @@ jobs:
name: ${{ matrix.os }}-packages
path: '**/bin/**/*.*nupkg'
- name: Publish MyGet
run: |
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
nuget push **/bin/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
# - name: Publish MyGet
# run: |
# nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
# nuget push **/bin/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package

View File

@ -19,12 +19,9 @@
<!--<MinVerVerbosity>detailed</MinVerVerbosity>-->
</PropertyGroup>
<Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)'!=''">
<Target Name="AssemblyVersionTarget" AfterTargets="MinVer" Condition="'$(MinVerVersion)'!='' AND '$(BuildNumber)' != ''">
<PropertyGroup>
<RevisionNumber>0</RevisionNumber>
<RevisionNumber Condition="$(MinVerVersion.Split(`.`).Length) == 4">$(MinVerVersion.Split(`.`)[3])</RevisionNumber>
<Version>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(RevisionNumber)</Version>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(RevisionNumber)</FileVersion>
<FileVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch).$(BuildNumber)</FileVersion>
</PropertyGroup>
</Target>