-
Notifications
You must be signed in to change notification settings - Fork 13
/
com.github.cli.yaml
56 lines (56 loc) · 1.8 KB
/
com.github.cli.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# TODO: switch to offline/cached build
app-id: com.github.cli
runtime: org.freedesktop.Sdk
runtime-version: '21.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.golang
command: gh
finish-args:
- --filesystem=home
- --filesystem=host
- --filesystem=~/.ssh
- --share=network
- --socket=ssh-auth
- --talk-name=org.freedesktop.Flatpak
- --talk-name=org.freedesktop.Flatpak.*
modules:
- name: github-cli
build-options:
build-args:
- --share=network
env:
- GOBIN=/app/bin
- GOPATH=/run/build/github-cli/gohome
- GOROOT=/usr/lib/sdk/golang
append-path: /usr/lib/sdk/golang/bin
no-autogen: true
make-install-args:
- prefix=/app
post-install:
# workaround for go annoyance
- find /run/build/github-cli ! -perm -0200 -exec chmod u+w '{}' \;
- install -Dm755 ${FLATPAK_DEST}/{bin,libexec}/gh
- install -Dm755 gh-wrapper ${FLATPAK_DEST}/bin/gh
- install -Dm755 editor-wrapper ${FLATPAK_DEST}/bin/editor
sources:
- type: archive
url: https://github.com/cli/cli/archive/v2.0.0.tar.gz
sha256: 5d93535395a6684dee1d9d1d3cde859addd76f56581e0111d95a9c685d582426
x-checker-data:
type: anitya
project-id: 135615
stable-only: true
url-template: https://github.com/cli/cli/archive/v$version.tar.gz
- type: script
dest-filename: gh-wrapper
commands:
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID
- export HOST_EDITOR=${EDITOR:-vi}
- export EDITOR=editor
- exec /app/libexec/gh "$@"
- type: script
dest-filename: editor-wrapper
commands:
- flatpak-spawn --host which ${HOST_EDITOR} || exit 1
- exec flatpak-spawn --host ${HOST_EDITOR} "$@"