Git Product home page Git Product logo

Comments (6)

andreasohlund avatar andreasohlund commented on August 23, 2024

Looking at the build log we're outputting that version:

[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo]
##teamcity[setParameter name='GitFlowVersion.NugetVersion'
value='1.1.0-Unstable0002']

Are you using the GitFlowVersion.NugetVersion TC parameter?

On Wed, Oct 16, 2013 at 3:11 PM, Niels Henrik Hagen <
[email protected]> wrote:

In TeamCity nuget gives my package the wrong version 1.1.0-Unstable2 it
should have been 1.1.0-Unstable0002

TeamCity build log output

[12:46:26]Checking for changes
[12:46:27]Publishing internal artifacts
[12:46:27][Publishing internal artifacts] Sending build.start.properties.gz file
[12:46:27]Clearing temporary directory: D:\BuildAgent3\temp\buildTmp
[12:46:27]Checkout directory: D:\BuildAgent3\work\81eeb890988465a3
[12:46:27]Updating sources: agent side checkout (5s)
[12:46:28][Updating sources] VCS Root: [email protected]:comperio/git-flow-test.git#refs/heads/master (5s)
[12:46:28][VCS Root: [email protected]:comperio/git-flow-test.git#refs/heads/master] revision: ff24a615e76ebe05b38cd015e3f6bb79f2bd6e13
[12:46:30][VCS Root: [email protected]:comperio/git-flow-test.git#refs/heads/master] Commit 'ff24a615e76ebe05b38cd015e3f6bb79f2bd6e13' is not found in repository. Running 'git fetch'...
[12:46:33][VCS Root: [email protected]:comperio/git-flow-test.git#refs/heads/master] Checking out branch refs/heads/develop in [email protected]:comperio/git-flow-test.git#refs/heads/master in D:\BuildAgent3\work\81eeb890988465a3 with revision ff24a615e76ebe05b38cd015e3f6bb79f2bd6e13
[12:46:33][VCS Root: [email protected]:comperio/git-flow-test.git#refs/heads/master] Cleaning [email protected]:comperio/git-flow-test.git#refs/heads/master in D:\BuildAgent3\work\81eeb890988465a3 the file set ALL_UNTRACKED
[12:46:33]Step 1/3: NuGet Installer
[12:46:33][Step 1/3] scan: Searching for nuget.config files
[12:46:33][scan] Found packages folder: D:\BuildAgent3\work\81eeb890988465a3\packages
[12:46:33][scan] Found list of packages.config files: D:\BuildAgent3\work\81eeb890988465a3\packages\repositories.config
[12:46:33][scan] Scanning projects in solution file: D:\BuildAgent3\work\81eeb890988465a3\git-flow-test.sln
[12:46:33][scan] Found project D:\BuildAgent3\work\81eeb890988465a3\git-flow-test\git-flow-test.csproj
[12:46:33][Step 1/3] install: Installing NuGet packages for git-flow-test\packages.config
[12:46:33][install] NuGet command: D:\BuildAgent3\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe install D:\BuildAgent3\work\81eeb890988465a3\git-flow-test\packages.config -OutputDirectory D:\BuildAgent3\work\81eeb890988465a3\packages -Source https://nuget.org/api/v2/ -Source https://comperio.myget.org/F/comperio/
[12:46:33][install] Starting: D:\BuildAgent3\temp\agentTmp\custom_script1691327164113908670.cmd
[12:46:33][install] in directory: D:\BuildAgent3\work\81eeb890988465a3\git-flow-test
[12:46:34][install] Restoring NuGet packages...
[12:46:34][install] To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
[12:46:34][install] Installing 'GitFlowVersionTask 0.4.0'.
[12:46:34][install] Successfully installed 'GitFlowVersionTask 0.4.0'.
[12:46:34][install] Process exited with code 0
[12:46:34]Step 2/3: Visual Studio (sln) (1s)
[12:46:34][Step 2/3] Starting: D:\BuildAgent3\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MsBuildBootstrap.exe /workdir:D:\BuildAgent3\work\81eeb890988465a3 /msbuildPath:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
[12:46:34][Step 2/3] in directory: D:\BuildAgent3\work\81eeb890988465a3
[12:46:35][Step 2/3] git-flow-test\git-flow-test.csproj.teamcity: Build target: Rebuild
[12:46:35][git-flow-test\git-flow-test.csproj.teamcity] CoreClean
[12:46:35][CoreClean] MakeDir
[12:46:35][MakeDir] Creating directory "obj\Debug".
[12:46:35][git-flow-test\git-flow-test.csproj.teamcity] PrepareForBuild
[12:46:35][PrepareForBuild] MakeDir
[12:46:35][MakeDir] Creating directory "bin\Debug".
[12:46:35][git-flow-test\git-flow-test.csproj.teamcity] UpdateAssemblyInfo
[12:46:35][UpdateAssemblyInfo] GitFlowVersionTask.UpdateAssemblyInfo
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] Version not in cache. Calculating version.
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] Executing inside a TeamCity build agent
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[buildNumber '1.1.0-Unstable2']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.Major' value='1']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.Minor' value='1']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.Patch' value='0']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.Stability' value='Unstable']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.PreReleaseNumber' value='2']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.Version' value='1.1.0-Unstable2']
[12:46:36][GitFlowVersionTask.UpdateAssemblyInfo] ##teamcity[setParameter name='GitFlowVersion.NugetVersion' value='1.1.0-Unstable0002']
[12:46:36][UpdateAssemblyInfo] D:\BuildAgent3\temp\buildTmp\GitFlowVersionTask\AssemblyInfo_git-flow-test.csproj_zl3lniz5.aa3.cs
[12:46:36][UpdateAssemblyInfo] BeforeInjection Class1.cs;Properties\AssemblyInfo.cs;D:\BuildAgent3\temp\buildTmp.NETFramework,Version=v4.5.AssemblyAttributes.cs
[12:46:36][UpdateAssemblyInfo] AfterInjection Class1.cs;Properties\AssemblyInfo.cs;D:\BuildAgent3\temp\buildTmp.NETFramework,Version=v4.5.AssemblyAttributes.cs;D:\BuildAgent3\temp\buildTmp\GitFlowVersionTask\AssemblyInfo_git-flow-test.csproj_zl3lniz5.aa3.cs
[12:46:36][git-flow-test\git-flow-test.csproj.teamcity] CoreCompile
[12:46:36][CoreCompile] Csc
[12:46:36][Csc] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program File
s (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\git-flow-test.dll /subsystemversion:6.00 /target:library /utf8output Class1.cs Properties\AssemblyInfo.cs "D:\BuildAgent3\temp\buildTmp.NETFramework,Version=v4.5.AssemblyAttributes.cs" D:\BuildAgent3\temp\buildTmp\GitFlowVersionTask\AssemblyInfo_git-flow-test.csproj_zl3lniz5.aa3.cs
[12:46:36][git-flow-test\git-flow-test.csproj.teamcity] CopyFilesToOutputDirectory
[12:46:36][CopyFilesToOutputDirectory] Copy
[12:46:36][Copy] Copying file from "obj\Debug\git-flow-test.dll" to "bin\Debug\git-flow-test.dll".
[12:46:36][CopyFilesToOutputDirectory] git-flow-test.csproj -> D:\BuildAgent3\work\81eeb890988465a3\git-flow-test\bin\Debug\git-flow-test.dll
[12:46:36][CopyFilesToOutputDirectory] Copy
[12:46:36][Copy] Copying file from "obj\Debug\git-flow-test.pdb" to "bin\Debug\git-flow-test.pdb".
[12:46:36][Step 2/3] Process exited with code 0
[12:46:36]Step 3/3: NuGet Pack
[12:46:36][Step 3/3] Cleaning D:\BuildAgent3\work\81eeb890988465a3\nuget
[12:46:36][Step 3/3] pack: Create NuGet package from git-flow-test\git-flow-test.csproj
[12:46:36][pack] NuGet command: D:\BuildAgent3\tools\NuGet.CommandLine.DEFAULT.nupkg\tools\NuGet.exe pack D:\BuildAgent3\work\81eeb890988465a3\git-flow-test\git-flow-test.csproj -OutputDirectory D:\BuildAgent3\work\81eeb890988465a3\nuget -Verbose -Version 1.1.0-Unstable2 -Properties Configuration=Debug
[12:46:36][pack] Starting: D:\BuildAgent3\temp\agentTmp\custom_script3961411118637342281.cmd
[12:46:36][pack] in directory: D:\BuildAgent3\work\81eeb890988465a3\git-flow-test
[12:46:36][pack] WARNING: Option 'Verbose' has been deprecated. Use 'Verbosity' instead.
[12:46:36][pack] Attempting to build package from 'git-flow-test.csproj'.
[12:46:36][pack] Packing files from 'D:\BuildAgent3\work\81eeb890988465a3\git-flow-test\bin\Debug'.
[12:46:36][pack] Found packages.config. Using packages listed as dependencies
[12:46:36][pack] WARNING: Description was not specified. Using 'Description'.
[12:46:36][pack] WARNING: Author was not specified. Using 'tcadmin'.
[12:46:37][pack]
[12:46:37][pack] Id: git-flow-test
[12:46:37][pack] Version: 1.1.0-Unstable2
[12:46:37][pack] Authors: tcadmin
[12:46:37][pack] Description: Description
[12:46:37][pack] Dependencies: GitFlowVersionTask (= 0.4.0)
[12:46:37][pack]
[12:46:37][pack] Added file 'lib\net45\git-flow-test.dll'.
[12:46:37][pack]
[12:46:37][pack] Successfully created package 'D:\BuildAgent3\work\81eeb890988465a3\nuget\git-flow-test.1.1.0-Unstable2.nupkg'.
[12:46:37][pack] Process exited with code 0
[12:46:37]Publishing artifacts
[12:46:37][Publishing artifacts] Collecting files to publish: [D:\BuildAgent3\temp\buildTmp\nuget6917621943974049810packages\nuget.xml => .teamcity/nuget]
[12:46:37][Publishing artifacts] Sending D:/BuildAgent3/temp/buildTmp/nuget6917621943974049810packages/nuget.xml
[12:46:37]Publishing internal artifacts
[12:46:37][Publishing internal artifacts] Sending build.finish.properties.gz file
[12:46:37]Build finished


Reply to this email directly or view it on GitHubhttps://github.com//issues/18
.

from gitversion.

nhhagen avatar nhhagen commented on August 23, 2024

No, I'm not. I tried putting that into the version property for the nuget build pack step, but them TC would not run the build. I'm guessing I'm missing a prefix or something,

I tried %GitFlowVersion.NugetVersion% instead of %build.number%

from gitversion.

andreasohlund avatar andreasohlund commented on August 23, 2024

You need to fool TC that it exists by adding a dummy property with the same name to the root project. Then it will run and gfv will update it so that downstream steps can use it

Sent from my iPhone

On 16 okt 2013, at 17:32, Niels Henrik Hagen [email protected] wrote:

No, I'm not. I tried putting that into the version property for the nuget build pack step, but them TC would not run the build. I'm guessing I'm missing a prefix or something,

I tried %GitFlowVersion.NugetVersion%


Reply to this email directly or view it on GitHub.

from gitversion.

nhhagen avatar nhhagen commented on August 23, 2024

Thanx, that worked - The readme is a bit unclear about this

  1. add fake build (or global prop) named GitFlowVersion.NuGetVersion
  2. configure nuget pack to use %GitFlowVersion.NugetVersion%

Now to figure out how to get this working across 6 build agents

from gitversion.

andreasohlund avatar andreasohlund commented on August 23, 2024

Perhaps a pull request with updated readme?;)

Sent from my iPhone

On 16 okt 2013, at 17:51, Niels Henrik Hagen [email protected] wrote:

Thanx, that worked - The readme is a bit unclear about this

add fake build (or global prop) named GitFlowVersion.NuGetVersion
configure nuget pack to use %GitFlowVersion.NugetVersion%
Now to figure out how to get this working across 6 build agents


Reply to this email directly or view it on GitHub.

from gitversion.

nhhagen avatar nhhagen commented on August 23, 2024

I'll get to it :)

from gitversion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.