Skip to content

Instantly share code, notes, and snippets.

@Pondidum
Last active September 15, 2016 05:06
Show Gist options
  • Select an option

  • Save Pondidum/681ad047f7f0267993a99c0db1398356 to your computer and use it in GitHub Desktop.

Select an option

Save Pondidum/681ad047f7f0267993a99c0db1398356 to your computer and use it in GitHub Desktop.
NAME='NScientist'
MODE=${1:-"Debug"}
dotnet restore
dotnet build "./src/$NAME" --configuration $MODE,
dotnet build "./src/$NAME.Tests" --configuration $MODE
dotnet test ."/src/$NAME.Tests" --configuration $MODE
dotnet pack ."/src/$NAME" --configuration $MODE --output ./build/deploy

advantages

  • portability (change build servers, migrate to new instances etc)
  • consistency (devs can run identical builds)
  • versioned (in the repo)
  • utilities (add other tasks to do things e.g. check package versions used, bump version numbers etc)

problems

  • branch builds/verison numbering between deploys
    • could use the script, but have two TeamCity builds
  • start using package restore?
    • means you need access to the internal feed...
    • but your repo size should be smaller

tooling

  • gulp
    • huge community
    • fairly easy to grok
    • per machine setup: install npm, npm install -g gulp
    • per project setup: npm install
    • run a build: gulp
    • run a specific task: gulp test:acceptance
  • cake
    • its c#
    • it shares a name with a javascript build tool, good luck on google
    • syntax seems more verbose than I like, but thats just my pref
    • thats all I know about it
  • fake
    • its f#
    • it's been around for years
    • I heard if you want to start learning F#, this is a reasonable way to get your feed wet
    • thats all I know about it
  • make
    • I know nothing about this
    • I've heard good and bad things
  • shell script
    • primitive
    • tasks etc are harder to write/chain
    • might as well use make?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment