Skip to content

Commit 20fcf88

Browse files
committed
Change "usage" message
1 parent 8d257e1 commit 20fcf88

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ build:
3232

3333
install: build
3434

35-
cp bin/postgres-ci-git-hook /usr/bin/postgres-ci-git-hook
35+
sudo cp bin/postgres-ci-git-hook /usr/bin/postgres-ci-git-hook
3636

3737
all: go build install

postgres-ci-git-hook.go

+18-10
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,31 @@ Example:
2929
3030
Server-side hook:
3131
32-
Set environment variables to post-receive hook file (.git/hooks/post-receive)
32+
Add to post-receive hook file (.git/hooks/post-receive)
3333
34-
export HOST=https://postgres-ci.com
35-
export TOKEN=587e6d7b-a023-4cab-b982-8169557e9e0c
36-
export EVENT=post-receive
34+
#!/bin/bash
3735
38-
/usr/bin/postgres-ci-git-hook
36+
export HOST=https://postgres-ci.com
37+
export TOKEN=587e6d7b-a023-4cab-b982-8169557e9e0c
38+
export EVENT=post-receive
39+
40+
/usr/bin/postgres-ci-git-hook
41+
42+
and make it executable (chmod +x)
3943
4044
Local hook:
4145
42-
Set environment variables to post-receive hook file (.git/hooks/post-commit)
46+
Add to post-commit hook file (.git/hooks/post-commit)
47+
48+
#!/bin/bash
49+
50+
export HOST=http://postgres-ci.local
51+
export TOKEN=587e6d7b-a023-4cab-b982-8169557e9e0c
52+
export EVENT=post-commit
4353
44-
export HOST=https://postgres-ci.com
45-
export TOKEN=587e6d7b-a023-4cab-b982-8169557e9e0c
46-
export EVENT=post-commit
54+
/usr/bin/postgres-ci-git-hook
4755
48-
/usr/bin/postgres-ci-git-hook
56+
and make it executable (chmod +x)
4957
`
5058

5159
var (

0 commit comments

Comments
 (0)