From 0af4066df92446f4c3819bb2dcf2decfce931a5f Mon Sep 17 00:00:00 2001 From: lhchavez Date: Sat, 4 Sep 2021 13:44:04 -0700 Subject: [PATCH] Rename the default branch to `main` (#786) (#788) We've renamed the default branch from `master` to `main`, so we need to change a bunch of references to that. (cherry picked from commit be5a99a807beb2fd79dc0ca71b5a92611b1eda52) --- .github/workflows/backport.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/tag.yml | 2 +- .travis.yml | 25 ------------------------- README.md | 14 +++++++------- 5 files changed, 10 insertions(+), 35 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 8e6ca2f..4172396 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -2,7 +2,7 @@ name: Backport to older releases on: push: branches: - - master + - main jobs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5744ee4..b8a8f48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ on: pull_request: push: branches: - - master + - main - release-* - v* diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index b293274..a1da6c1 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -2,7 +2,7 @@ name: Tag new releases on: push: branches: - - master + - main - release-* jobs: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0b7f482..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: go - -arch: - - AMD64 - - ppc64le - -go: - - tip - -install: - - sudo apt-get install -y --no-install-recommends libssh2-1-dev - - make build-libgit2-static - - go get --tags "static" ./... - -script: - - make test-static - -git: - submodules: true - -branches: - only: - - master - - /v\d+/ - - /release-.*/ diff --git a/README.md b/README.md index 20c11e0..203e392 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ git2go ====== -[![GoDoc](https://godoc.org/github.com/libgit2/git2go?status.svg)](http://godoc.org/github.com/libgit2/git2go) [![Build Status](https://travis-ci.org/libgit2/git2go.svg?branch=master)](https://travis-ci.org/libgit2/git2go) +[![GoDoc](https://godoc.org/github.com/libgit2/git2go?status.svg)](http://godoc.org/github.com/libgit2/git2go) [![Build Status](https://travis-ci.org/libgit2/git2go.svg?branch=main)](https://travis-ci.org/libgit2/git2go) Go bindings for [libgit2](http://libgit2.github.com/). @@ -10,7 +10,7 @@ Due to the fact that Go 1.11 module versions have semantic meaning and don't nec | libgit2 | git2go | |---------|---------------| -| master | (will be v30) | +| main | (will be v30) | | 0.99 | v29 | | 0.28 | v28 | | 0.27 | v27 | @@ -26,7 +26,7 @@ import "github.com/libgit2/git2go/v27" which will ensure there are no sudden changes to the API. -The `master` branch follows the tip of libgit2 itself (with some lag) and as such has no guarantees on the stability of libgit2's API. Thus this only supports statically linking against libgit2. +The `main` branch follows the tip of libgit2 itself (with some lag) and as such has no guarantees on the stability of libgit2's API. Thus this only supports statically linking against libgit2. ### Which branch to send Pull requests to @@ -56,16 +56,16 @@ Follow the instructions for [Versioned branch, dynamic linking](#versioned-branc go test -tags static,system_libgit2 github.com/my/project/... go install -tags static,system_libgit2 github.com/my/project/... -### Master branch, or vendored static linking +### `main` branch, or vendored static linking -If using `master` or building a branch with the vendored libgit2 statically, we need to build libgit2 first. In order to build it, you need `cmake`, `pkg-config` and a C compiler. You will also need the development packages for OpenSSL (outside of Windows or macOS) and LibSSH2 installed if you want libgit2 to support HTTPS and SSH respectively. Note that even if libgit2 is included in the resulting binary, its dependencies will not be. +If using `main` or building a branch with the vendored libgit2 statically, we need to build libgit2 first. In order to build it, you need `cmake`, `pkg-config` and a C compiler. You will also need the development packages for OpenSSL (outside of Windows or macOS) and LibSSH2 installed if you want libgit2 to support HTTPS and SSH respectively. Note that even if libgit2 is included in the resulting binary, its dependencies will not be. Run `go get -d github.com/libgit2/git2go` to download the code and go to your `$GOPATH/src/github.com/libgit2/git2go` directory. From there, we need to build the C code and put it into the resulting go binary. git submodule update --init # get libgit2 make install-static -will compile libgit2, link it into git2go and install it. The `master` branch is set up to follow the specific libgit2 version that is vendored, so trying dynamic linking may or may not work depending on the exact versions involved. +will compile libgit2, link it into git2go and install it. The `main` branch is set up to follow the specific libgit2 version that is vendored, so trying dynamic linking may or may not work depending on the exact versions involved. In order to let Go pass the correct flags to `pkg-config`, `-tags static` needs to be passed to all `go` commands that build any binaries. For instance: @@ -85,7 +85,7 @@ libgit2 may use OpenSSL and LibSSH2 for performing encrypted network connections Running the tests ----------------- -For the stable version, `go test` will work as usual. For the `master` branch, similarly to installing, running the tests requires building a local libgit2 library, so the Makefile provides a wrapper that makes sure it's built +For the stable version, `go test` will work as usual. For the `main` branch, similarly to installing, running the tests requires building a local libgit2 library, so the Makefile provides a wrapper that makes sure it's built make test-static