Giter Site home page Giter Site logo

third_party.go's Introduction

third_party.go

third_party.go is a self contained single file that helps with bumping third party repos and managing the GOPATH.

Build Status

Usage

Setup a repo

curl https://raw.github.com/coreos/third_party.go/master/third_party.go > third_party.go
go run third_party.go setup github.com/mygithubname/newproject
git add .
git commit -m "Initial commit"

Build your project

When none of the third_party.go subcommands are used it acts simply as a wrapper around go that sets up the environment variables to GOPATH. So, just use build and your package name.

go run third_party.go build -v github.com/mygithubname/newproject

Bumping a package

third_party.go helps you bump and manage packages. This will put the goraft package into your third_party/src directory and tell you the git commit that it came from.

go run third_party.go bump github.com/goraft/raft
github.com/goraft/raft c064081f635e519f162280f133faebc1a445106b

It's also possible to bump a package to a specific ref

go run third_party.go bump github.com/goraft/raft 3509cfa7b1
github.com/goraft/raft 3509cfa7b12a39cde502b0d4afa1dd1023ce603c

Bumping all packages

This will walk all of the packages installed in third_party/src and run the bump subcommand on it if it is a valid go pkg.

go run third_party.go bump-all

Testing third_party.go

Becuase third_party.go has a +build ignore tag at the top you will need to use the test script to run the unit tests:

./test

Cross compiling

go run will use the GOOS and GOARCH flags when trying to run third_party.go. This will most certainly cause a crash trying to run a third_party.go cross-compiled binary on your workstation.

As a workaround you can provide the -os and -arch flags to set GOOS and GOARCH to the next process.

third_party.go's People

Contributors

jonboulle avatar oremj avatar philips 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.