Skip to content

Commit 5191a21

Browse files
author
Sébastien HOUZÉ
authored
Merge pull request #13 from inextensodigital/chore-add-install-script
doc: document new install script
2 parents cbb392e + a98b206 commit 5191a21

2 files changed

Lines changed: 10 additions & 20 deletions

File tree

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ are already great at doing that.
2424
go get github.com/inextensodigital/github
2525
```
2626

27-
or... (feel free to replace `linux` by either `windows` or `darwin`)
27+
or you can use the install script:
28+
29+
```shell
30+
curl -qs https://raw.githubusercontent.com/inextensodigital/github/master/install.sh | bash -
31+
```
32+
33+
or a simplified version (feel free to replace `linux` by either `windows` or `darwin`)
2834

2935
```shell
3036
curl -s https://api.github.com/repos/inextensodigital/github/releases/latest |
@@ -53,12 +59,7 @@ jobs:
5359
runs-on: ubuntu-latest
5460
steps:
5561
- run: echo build app
56-
- run: |
57-
sudo wget -q -O /usr/local/bin/github $(
58-
curl -s https://api.github.com/repos/inextensodigital/github/releases/latest |
59-
jq -r '.assets[] | select(.name | test("linux-amd64$")) | .browser_download_url'
60-
)
61-
sudo chmod +x /usr/local/bin/github
62+
- run: curl -qs https://raw.githubusercontent.com/inextensodigital/github/master/install.sh | bash -
6263
- id: deployment
6364
env:
6465
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -105,12 +106,7 @@ jobs:
105106
# jq -r '.assets[] | select(.name | contains("linux-amd64")) | .browser_download_url' |
106107
# wget -qi - -O - | sudo tar xzpf - -C / --strip-components=1
107108
# - uses: actions/checkout@master
108-
- run: |
109-
sudo wget -q -O /usr/local/bin/github $(
110-
curl -s https://api.github.com/repos/inextensodigital/github/releases/latest |
111-
jq -r '.assets[] | select(.name | test("linux-amd64$")) | .browser_download_url'
112-
)
113-
sudo chmod +x /usr/local/bin/github
109+
- run: curl -qs https://raw.githubusercontent.com/inextensodigital/github/master/install.sh | bash -
114110
- id: deployment
115111
env:
116112
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -151,12 +147,7 @@ jobs:
151147
needs: should-deploy
152148
runs-on: ubuntu-latest
153149
steps:
154-
- run: |
155-
sudo wget -q -O /usr/local/bin/github $(
156-
curl -s https://api.github.com/repos/inextensodigital/github/releases/latest |
157-
jq -r '.assets[] | select(.name | test("linux-amd64$")) | .browser_download_url'
158-
)
159-
sudo chmod +x /usr/local/bin/github
150+
- run: curl -qs https://raw.githubusercontent.com/inextensodigital/github/master/install.sh | bash -
160151
- env:
161152
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
162153
ID: ${{ github.event.deployment.id }}

install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ checkGithubInstalledVersion() {
9393
# downloadFile downloads the latest binary package and also the checksum
9494
# for that binary.
9595
downloadFile() {
96-
echo $TAG $OS $ARCH
9796
DOWNLOAD_URL=$(
9897
curl -s https://api.github.com/repos/inextensodigital/github/releases/tags/$TAG | \
9998
jq -r '.assets[] | select(.name | test("'$OS'-'$ARCH'$")) | .browser_download_url'

0 commit comments

Comments
 (0)