Git Product home page Git Product logo

cake.proget's Introduction

Cake.ProGet

Cake.ProGet is a Cake add-in that exposes Inedo ProGet functionality to your build scripts.

Build status

Table of Contents

  1. Building
  2. Pre-Requisites
  3. Examples
  4. Contributing
  5. License

Building

This package is built using Cake.Recipe

> .\build.ps1

Pre-Requisites

The Cake.ProGet add-in is intended to be used in conjunction with your organization's ProGet asset repository. The alias methods for the Universal Package functionality will require your build environment to have upack.exe available to it.

There are several ways you can configure your build environment for the upack.exe:

  • Add the installation path to your %PATH% variable.
  • Create environment variable(s) %UPackInstall% with the correct installation path set.
  • Host a local (to your organization) nuget package with the UPack executable and resolve the tool using a #tool directive. i.e., #tool "nuget:?package=YourPackage"

The order of resolution will be (first to last): local tool resolution via #tool, then the %UPackInstall% variable, and finally %PATH% variable. This gives you flexibility in resolving a more specific version in a given build or allowing a system-wide default.

Examples

Universal Package

A full example can be found here

#addin "nuget:?package=Cake.ProGet"

Task("Create-Package")
    .Description("Creates a universal package")    
    .Does(() => {
        Pack(new UniversalPackagePackSettings(
            "./UPack.Example.uspec",
            "./content"
        ));
    });

Task("Publish-Package")
    .Description("Publishes a universal package")
    .IsDependentOn("Create-Package")
    .Does(() => {                
        foreach(var item in GetFiles("./*.upack"))
        {
            Push(new UniversalPackagePushSettings(item.FullPath, "http://your-proget-server/upack/packages/"));
        }        
    });

ProGet Assets

A full example can be found here

#addin "nuget:?package=Cake.ProGet"

var Version = "0.1.0";

Task("Create-Package")
    .Description("Creates a package as a build artifact")
    .IsDependentOn("Clean")
    .Does(() => {
        Zip("./content", "artifact.zip");
    });

Task("Publish-Package")
    .Description("Publishes a ProGet asset")
    .IsDependentOn("Create-Package")
    .Does(() => {
        // TODO: this endpoint would be formatted based on your specific hosting environment/naming scheme.
        var assetUri = string.Format("http://your-proget-server/endpoints/asset-dir/content/test-artifact-{0}.zip", Version);
        PushAsset("./artifact.zip", assetUri, new ProGetConfiguration());
    });

Contributing

If you're thinking about contributing to Cake.ProGet, please make sure you've read the contribution guidelines before creating your first pull request.

  • Fork the repository.
  • Create a branch to work in.
  • Make your feature addition or bug fix.
  • Don't forget the unit tests.
  • Send a pull request.

License

Copyright © Apprenda Inc., and contributors.

Cake.ProGet is provided as-is under the MIT license. For more information see LICENSE.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.

cake.proget's People

Contributors

kcamp avatar

Watchers

Anna Moser avatar

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.