Coder Social home page Coder Social logo

Comments (18)

joergbattermann avatar joergbattermann commented on May 14, 2024

+1

Ideally and optionally (on/off checkbox) packing and publishing of Symbol packages should be performed in the same task.

from azure-pipelines-tasks.

lawrencegripper avatar lawrencegripper commented on May 14, 2024

I'm looking for the similar behaviour, I'll try and put something together in a pull request over the next couple of weeks.

Initially will look to take a Nuspec or sln, package to nupkg and publish to a nuget server.

@bryanmacfarlane contributor guide doesn't mention creation of completely new Tasks, is this something your happy to accept? Is there anything I should do/not do? Was planning to use the existing nuget based tasks as guides for style.

from azure-pipelines-tasks.

stas-sultanov avatar stas-sultanov commented on May 14, 2024

@lawrencegripper it would be nice if this task will allow to avoid use of nuspec file at all.
it could be generated using metadata from assembly and adding some data from Task metadata

from azure-pipelines-tasks.

lawrencegripper avatar lawrencegripper commented on May 14, 2024

Got this working, you can either specify a nuspec file or package a csproj file, the task looks at the build information and uses this to version the resulting package.

Pull request is in, in the meantime you can clone the fork, use gulp to build the and the taskuploader to publish to your own VSO for testing.

#381

from azure-pipelines-tasks.

pksorensen avatar pksorensen commented on May 14, 2024

Do you know a blog post or anything explaining how to build and upload a task? Just found this post and wanted to try do the same. I forked the project and created a new Task. Got all the tooling installed, but unsure what I need to do after creating my task. I have run the clean and compile tasks in the gulp file.

from azure-pipelines-tasks.

bryanmacfarlane avatar bryanmacfarlane commented on May 14, 2024

@s093294
https://github.com/Microsoft/tfs-cli/blob/master/docs/buildtasks.md

from azure-pipelines-tasks.

pksorensen avatar pksorensen commented on May 14, 2024

Thanks. @bryanmacfarlane

Just found that also. the generated file task.loc.json, I cant seem to figure out how to generate that. Since I copied one of the other tasks and just edited a few things like guids and want to test uploading that to my VSO. But the .loc.json file is not changed accordingly.

from azure-pipelines-tasks.

bryanmacfarlane avatar bryanmacfarlane commented on May 14, 2024

@s093294 let's get this conversation off this PR about the Nuget task.

But the short answer is you don't have to create a task.loc.json but you can if you want to localize that task in n langs. Microsoft does that for our in the box tasks and we have a loc team that does it. And our gulp build process in our repo creates it and extracts the strings.

from azure-pipelines-tasks.

pksorensen avatar pksorensen commented on May 14, 2024

Thanks @bryanmacfarlane Got everything working and my tasks into VSO.

from azure-pipelines-tasks.

clairernovotny avatar clairernovotny commented on May 14, 2024

For versioning, can I suggest using GitVersion? This nuget publish task should not automatically read versions, though I agree it should be a parameter. Also, the publish feed should be a parameter too as it might not be NuGet.org; it could be MyGet or elsewhere. Further, the published feed might need either an APIKey or credentials, so those should be passed as parameters too. For credentials, I think the protected variables should work and those could be passed in securely.

BTW, GitVersion has a VSO build step now, so it's really easy to use: https://github.com/GitTools/GitVersion/blob/master/docs/more-info/build-server-setup/tfs-build-vnext.md

The GitVersion build step will write variables that should be usable by other build steps/tasks, including a NuGet version variable.

from azure-pipelines-tasks.

stas-sultanov avatar stas-sultanov commented on May 14, 2024

@onovotny yep, it would be nice.

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on May 14, 2024

@onovotny Why would you like to make a dependency between GitVersion and the NuGet Publish task? IMHO the solution provided in #381 is sufficient with the possibility to overwrite the version in the NuGet Package Task through additional arguments.

from azure-pipelines-tasks.

clairernovotny avatar clairernovotny commented on May 14, 2024

Sorry, I didn't mean to imply a dependency between the two tasks Rather, I was suggesting that GitVersion could be used to obtain a version number parameter to counter the second half of the suggestion:

Also it would be nice if there would be some sort of prebuild step that will replace version in *.cs files with value from the Build Number

from azure-pipelines-tasks.

stas-sultanov avatar stas-sultanov commented on May 14, 2024

I belive that GitVersion may be used for AssemblyVersion and NuGet Package version.

from azure-pipelines-tasks.

SamJongenelen avatar SamJongenelen commented on May 14, 2024

+1 on the task for assembly file version!
The ms build targets make it possible to generate build numbers from a variable in your product file. Msbuild targets is on github too.
It would be awesome to do this from a vso agent build step!

from azure-pipelines-tasks.

pascalberger avatar pascalberger commented on May 14, 2024

@SamJongenelen You can already use the GitVersion task to determine the version, update AssemblyInfos or pass this to the NuGet pack task. Or for a generic solutions see the task in #554

from azure-pipelines-tasks.

SamJongenelen avatar SamJongenelen commented on May 14, 2024

@pascalberger thanks! That's exactly what I meant

from azure-pipelines-tasks.

vtbassmatt avatar vtbassmatt commented on May 14, 2024

Closing this one since there are now NuGet Pack and NuGet Publish steps. Thanks!

from azure-pipelines-tasks.

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.