Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Eli Schwartz fc6accf66c
Makefile: fix arguments to go, not matching what go expects
This caused gcc to receive the actual argument "''" or for example
"'-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'" and then error
with
gcc: error: '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now': No such file or directory

Furthermore, the trimpath arguments tried to trim an actual path
resembling "'$PWD'", which did nothing as the literal single quotes were
not valid in this context.

Both issues can be fixed by assigning arguments to the go compiler using
the argv notation { "-flag", "argument" } rather than { "-flag=argument" }.
2019-01-27 04:15:43 -05:00
Mislav Marohnić 2799bb038d [build] Fix `make man-pages` in CI
https://travis-ci.org/github/hub/jobs/484769927
2019-01-26 17:03:50 +01:00
Mislav Marohnić 23d739dffd [api] Add extended documentation for hub-api(1) 2019-01-24 20:05:26 +01:00
Mislav Marohnić dd5388fecd Support `trimpath` for Go v1.8/1.9
Go 1.10 release notes:

> The go build -asmflags, -gcflags, -gccgoflags, and -ldflags options
> now apply by default only to the packages listed directly on the
> command line. For example, go build -gcflags=-m mypkg passes the
> compiler the -m flag when building mypkg but not its dependencies. The
> new, more general form -asmflags=pattern=flags (and similarly for the
> others) applies the flags only to the packages matching the pattern.
> For example: go install -ldflags=cmd/gofmt=-X=main.version=1.2.3
> cmd/... installs all the commands matching cmd/... but only applies
> the -X option to the linker flags for cmd/gofmt. For more details, see
> go help build.
2019-01-02 17:02:12 +01:00
Mislav Marohnić d0541a127d Ensure that all external LDFLAGS are properly forwarded to `-extldflags` 2019-01-02 17:00:15 +01:00
Eli Schwartz 39e1523442 build: respect environment LDFLAGS and strip the build path
golang does not natively respect LDFLAGS, but you can pass them on the
command line using -ldflags=-extldflags=...
This is important for distributions, in order to provide common
functionality such as hardening flags.

Also strip the prefixed root source directory from the embedded source
file paths. This is not important information for the debugger, which
should only care about paths relative to $GOPATH, and results in less
build environment metadata leaking into the final binary. (This also
aids in reproducible builds when using different build directories, see
e.g. https://github.com/golang/go/issues/16860)
2019-01-02 17:00:15 +01:00
Eli Schwartz 25a793a8d7
build: embed reproducible timestamp in manpages
If the environment variable SOURCE_DATE_EPOCH is set in the build
environment, prefer it over the current date when determining the
correct timestamp to use as the date the manpages were built.

See https://reproducible-builds.org/specs/source-date-epoch/
2018-12-29 19:59:02 -05:00
Mislav Marohnić a88df6f644 Add HTML template for man pages 2018-12-29 14:33:12 +01:00
Mislav Marohnić cf02dd1118 Switch to new md2roff process in `make man-pages` 2018-12-29 14:33:12 +01:00
Mislav Marohnić 6576191282 Make the utility file during `make man-pages` hidden 2018-11-12 16:44:42 +01:00
Bernhard M. Wiedemann 66399a4e3a Speed up man page generation
by a factor of 3
Without this patch, using make -j
built every man page and html page 25 times

Now, man pages are always generated in a single ronn call
after all .ronn files are made.

Workarounds GNU make bug https://savannah.gnu.org/bugs/?54854
2018-10-17 14:28:32 +02:00
Mislav Marohnić 00e1b9957d Remove obsolete build steps
This was from the time when we tried to have hub build even if it wasn't
checkout out within a local GOPATH. This change assumes a working Go
environment.
2018-06-08 20:57:27 +02:00
Mislav Marohnić ce45e3b869 Increase code coverage treshold
Latest build on this branch reports 89.5%:
https://travis-ci.org/github/hub/builds/389290940
2018-06-07 17:46:35 +02:00
Mislav Marohnić 429ea7d79e Require minimum test coverage 2018-06-07 14:58:14 +02:00
Andreas Baumann b2b3184bb4 added a preliminary delete repository command (because I need it) 2018-03-18 20:47:34 +01:00
Mislav Marohnić 0300450634 Simplify `make clean` 2017-05-17 13:03:06 +02:00
Pepper Lebeck-Jobe 71fa8dad8f
Upgrade to Go 1.8
The only thing that has substansively changed is that Go 1.8 handles
redirect logic more safely than previous versions. This means we can
drop our special handling to avoid following redirects to other
domains. We were only doing that to protect against the possibility
of leaking auth headers. With Go 1.8, the auth headers are not
forwarded when following a redirect to another domain, so we don't
need our special handling any more.

As long as people are attempting to build with the Makefile, the new
check_go_version script should cause the build to stop if our
collaborators aren't using at least version 1.8 of go.
2017-05-11 13:24:04 +09:00
Johan Walles 2eb3056a8c Rename "review"->"pr"
The current functionality should really be moved to "hub pr checkout".
This is a step on the way.
2017-04-08 10:43:25 +02:00
Johan Walles dc7abb5c12 Add a "hub review" command
It wraps functionality already provided by "hub checkout". The advantage
with "hub review" are twofold:

* Discoverability. It wasn't until I started browsing the hub source
  code that I realized this functionality was present.
* Usability. Just typing the PR number is easier than having to figure
  out its URL.
2017-04-08 10:43:25 +02:00
Mislav Marohnić ef8ac0e2eb Add `make install`
Installs hub binary and man pages into `/usr/local` by default.

Fixes #1291
2016-10-03 20:32:39 +02:00
Mislav Marohnić ce24b1cf7e New `hub sync` command to update local branches
Ported from my bash version over at
370154a5ad/bin/git-sync
2016-09-12 06:29:53 +02:00
Mislav Marohnić f9692485f0 Advertise hub-issue(1) and hub-release(1) in man pages 2016-08-21 14:20:10 +02:00
Mislav Marohnić b2d567df54 Move man pages to `share/man/man1/` 2016-08-21 14:20:10 +02:00
Mislav Marohnić 0fb96e053e Add `hub release show <TAG>` 2016-01-31 18:57:44 +11:00
Mislav Marohnić f74b54aa1b Add `hub help` documentation 2016-01-25 22:32:00 +11:00
Mislav Marohnić fa2ba49207 `make fmt` 2016-01-25 17:14:05 +11:00
Mislav Marohnić 54262e6606 Makefile galore! 2016-01-25 15:58:17 +11:00