You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using oh-my-zsh, then gup has an alias set up. The alias is `gup - git pull --rebase`. Therefore, please make sure that the oh-my-zsh alias is disabled (e.g. $ \gup update).
21
20
21
+
## Breaking change (v1.0.0)
22
+
- The config file format changed from `gup.conf` to `gup.json`.
23
+
-`gup.conf` is no longer read by `gup import`.
24
+
- The update channel (`latest` / `main` / `master`) is stored per package in `gup.json`.
25
+
22
26
23
27
## Supported OS (unit testing with GitHub Actions)
24
28
- Linux
@@ -80,10 +84,15 @@ Also works in combination with --dry-run
80
84
$ gup update --exclude=gopls,golangci-lint //--exclude or -e, this example will exclude 'gopls' and 'golangci-lint'
81
85
```
82
86
83
-
### Update binaries with @main or @master
84
-
If you want to update binaries with @master or @main, you can specify the -m or --master option.
87
+
### Update binaries with @main, @master, or @latest
88
+
If you want to control update source per binary, use the following options:
89
+
-`--main` (`-m`): update by `@main` (fallback to `@master`)
90
+
-`--master`: update by `@master`
91
+
-`--latest`: update by `@latest`
92
+
93
+
The selected channel is saved to `gup.json` and reused by future `gup update` runs.
### List up command name with package path and version under $GOPATH/bin
@@ -133,27 +142,54 @@ If you want to update binaries, the following command.
133
142
$ gup update mimixbox
134
143
```
135
144
### Export/Import subcommand
136
-
You use the export/import subcommand if you want to install the same golang binaries across multiple systems. By default, export-subcommand exports the file to $XDG_CONFIG_HOME/gup/gup.conf. If you want to know [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html), see this link. After you have placed gup.conf in the same path hierarchy on another system, you execute import-subcommand. gup start the installation
137
-
according to the contents of gup.conf.
145
+
Use export/import when you want to install the same Go binaries across multiple systems.
`import` installs the exact version written in the file.
148
+
149
+
```json
150
+
{
151
+
"schema_version": 1,
152
+
"packages": [
153
+
{
154
+
"name": "gal",
155
+
"import_path": "github.com/nao1215/gal/cmd/gal",
156
+
"version": "v1.1.1",
157
+
"channel": "latest"
158
+
},
159
+
{
160
+
"name": "posixer",
161
+
"import_path": "github.com/nao1215/posixer",
162
+
"version": "v0.1.0",
163
+
"channel": "main"
164
+
}
165
+
]
166
+
}
167
+
```
168
+
169
+
By default:
170
+
-`gup export` writes to `$XDG_CONFIG_HOME/gup/gup.json`
171
+
-`gup import` auto-detects config path in this order:
172
+
1)`$XDG_CONFIG_HOME/gup/gup.json` (if exists)
173
+
2)`./gup.json` (if exists)
174
+
175
+
You can always override the path with `--file`.
138
176
139
177
```shell
140
178
※ Environments A (e.g. ubuntu)
141
179
$ gup export
142
-
Export /home/nao/.config/gup/gup.conf
180
+
Export /home/nao/.config/gup/gup.json
143
181
144
182
※ Environments B (e.g. debian)
145
-
$ ls /home/nao/.config/gup/gup.conf
146
-
/home/nao/.config/gup/gup.conf
147
183
$ gup import
148
184
```
149
185
150
-
Alternatively, export subcommand print package information (it's same as gup.conf) that you want to export at STDOUT if you use --output option. import subcommand can also specify the gup.conf file path if you use --input option.
186
+
`export` can print config content to STDOUT by `--output`. `import`can read a specific file by `--file`.
completion subcommand generates shell completion files for bash, zsh, and fish. If the shell completion file does not exist in the system, the generation process will begin. To activate the completion feature, restart the shell.
213
+
`completion` prints completion scripts to STDOUT when you pass a shell name.
214
+
To install completion files into your user environment, use `--install`.
0 commit comments