X Tutup
Skip to content

Commit 3673a9b

Browse files
committed
Add more documentation for script/build.go
1 parent 39431a1 commit 3673a9b

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.github/CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,15 @@ Prerequisites:
2626
- Go 1.13+ for building the binary
2727
- Go 1.15+ for running the test suite
2828

29-
Build with: `make` or `go build -o bin/gh ./cmd/gh`
29+
Build with:
30+
* Unix-like systems: `make`
31+
* Windows: `go run script/build.go`
3032

31-
Run the new binary as: `./bin/gh`
33+
Run the new binary as:
34+
* Unix-like systems: `bin/gh`
35+
* Windows: `bin\gh`
3236

33-
Run tests with: `make test` or `go test ./...`
37+
Run tests with: `go test ./...`
3438

3539
## Submitting a pull request
3640

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ export CGO_CFLAGS
55
CGO_LDFLAGS ?= $(filter -g -L% -l% -O%,${LDFLAGS})
66
export CGO_LDFLAGS
77

8+
## The following tasks delegate to `script/build.go` so they can be run cross-platform.
9+
810
.PHONY: bin/gh
911
bin/gh: script/build
1012
@script/build bin/gh
@@ -20,10 +22,13 @@ clean: script/build
2022
manpages: script/build
2123
@script/build manpages
2224

25+
# just a convenience task around `go test`
2326
.PHONY: test
2427
test:
2528
go test ./...
2629

30+
## Site-related tasks are exclusively intended for use by the GitHub CLI team and for our release automation.
31+
2732
site:
2833
git clone https://github.com/github/cli.github.com.git "$@"
2934

@@ -45,6 +50,8 @@ endif
4550
rm -f site/index.html.bak
4651
git -C site commit -m '$(GITHUB_REF:refs/tags/v%=%)' index.html
4752

53+
## Install/uninstall tasks are here for use on *nix platform. On Windows, there is no equivalent.
54+
4855
DESTDIR :=
4956
prefix := /usr/local
5057
bindir := ${prefix}/bin

0 commit comments

Comments
 (0)
X Tutup