forked from gruntwork-io/fetch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoption_text.go
More file actions
96 lines (81 loc) · 3.2 KB
/
Copy pathoption_text.go
File metadata and controls
96 lines (81 loc) · 3.2 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package main
// the consts below contain zero-width spaces to force urfave/cli-generated
// help text to separate sections with a blank line, for readability.
const usageLead = `
GITHUB_TOKEN=$access_token ghfetch [global options] /my/downloads/dir
See https://github.com/opsgang/fetch for examples, argument definitions, and additional docs.
`
const txtUsage = `
* Download selected subfolders/files OR release attachments of a GitHub repo.
* Select a specific git commit, branch, or tag.
* Specify a semantic version constraint for tags e.g. '>=1.0,<2.0' !
* Choose to automatically unpack release attachment tars and gzips!!
* Verify downloaded release attachments against gpg asc signature files!!!
`
const txtRepo = `
Required. Fully qualified url of the github repo.
`
const txtCommit = `
Git commit SHA1 to checkout. Overrides --branch and --tag.
`
const txtBranch = `
Git branch - will checkout HEAD commit. Overrides --tag.
`
const txtTag = `
Git tag to download, expressed with Hashicorp's version constraint operators.
If empty, ghfetch will download the latest tag.
Examples: https://github.com/opsgang/fetch#version-constraint-operators.
`
const txtFromPath = `
Get contents of ` + "`/PATH/IN/REPO`" + `. The folder itself is not created locally,
only its contents. /PATH/IN/REPO can also be the path to a single file.
If this or --release-asset aren't specified, all files are downloaded.
Specify multiple times to download multiple folders or files.
e.g. # puts libs/* and build.sh in to /opt/libs
--from-path='/libs/' --from-path='/scripts/build.sh' /opt/libs
`
const txtReleaseAsset = `
Name of github release attachment to download. Requires --tag.
Specify multiple times to grab more than one attachment.
e.g. # get foo.tgz and bar.txt from latest 1.x release attachments
--tag='~>1.0' --release-asset='foo.tgz' --release-asset='bar.txt',
`
const txtVerbose = `
Shouty mode. Reveals more of what's happening during execution.
For when STDOUT craves more excitement.
`
const txtWhichTag = `
Will exit after displaying which tag would have been retrieved.
Only relevant if a tag constraint is specified.
`
const txtUnpack = `
Whether to unpack a compressed release attachment. Requires --release-asset.
Only unpacks tars, tar-gzip and gzip, otherwise does nothing.
e.g. # unpack latest 1.x tag of foo.tgz in to /var/tmp/foo
--tag='~>1.0' --unpack --release-asset='foo.tgz',
`
const txtTimeout = `
Number of seconds to wait for each download to complete.
If you pass a value of 0, you'll get the default.
If you pass a negative number, you'll get scolded.`
const txtGpgPubKey = "`/PATH/TO/KEY` " + `to verify downloaded release assets.
Requires --release-asset.
If set, will look for <asset-name>.asc or <asset-name>.asc.txt attached
to the chosen release. That signature and /PATH/TO/KEY will be used
for gpg verification.
If signature file not found, or verification fails, the release-asset is deleted.
`
const txtToken = `
GitHub Personal Access Token, required to download from private repos.
Also enables GitHub api's higher rate-limit. It is recommended to set
this in the env var API_TOKEN before invoking ghfetch,
instead of via this commandline option.
`