Skip to content

Commit

Permalink
Add update. Add version support. Flesh out install.
Browse files Browse the repository at this point in the history
  • Loading branch information
TekWizely committed Mar 10, 2020
1 parent 2602489 commit d4d48d9
Show file tree
Hide file tree
Showing 2 changed files with 259 additions and 48 deletions.
67 changes: 57 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ Bingo makes installing and managing golang-compiled binaries a bit easier.

- [Compiling + Installing Binaries](#compiling--installing-binaries)
- [Compiling 'Complicated' Packages](#compiling-complicated-packages)
- [Specifying Package Version](#specifying-package-version)
- [Binary Naming](#binary-naming)
- [Listing Installed Binaries](#listing-installed-binaries)
- [Displaying A Binary's Associated Package](#displaying-a-binarys-associated-package)
- [Updating Binaries](#updating-binaries)
- [Uninstalling Binaries / Packages](#uninstalling-binaries--packages)
- [Upgrading Binaries](#upgrading-binaries)

------------------------------------
#### Compiling + Installing Binaries
Expand All @@ -47,8 +48,9 @@ _hello example_
$ bingo install github.com/golang/example/hello
Installing binary hello from package github.com/golang/example/hello
Downloading package (folder: '~/.bingo/pkg/hello')
Compiling package
Downloading & compiling package (folder: '~/.bingo/pkg/hello')
go: downloading github.com/golang/example v0.0.0-20170904185048-46695d81d1fa
go: found github.com/golang/example/hello in github.com/golang/example v0.0.0-20170904185048-46695d81d1fa
Installing binary (file: '~/.bingo/bin/hello')
Done
Expand All @@ -68,6 +70,24 @@ Packages that require a more complex build process are not supported at this tim

See the [Work Folders](#work-folders) section for details on configuring the various folders needed by bingo, including which folder to install binaries in.

##### Specifying Package Version

You can specify which version of a package to install.

###### '@version' Syntax

_install example using @version syntax_
```
$ bingo install github.com/golang/example/[email protected]
```

###### '--version' Option

_install example using --version option_
```
$ bingo install --version v1.2.3 github.com/golang/example/hello
```

##### Binary Naming

By default, the installed binary will be named after the last folder element in its package path.
Expand Down Expand Up @@ -114,6 +134,40 @@ $ bingo package hello
github.com/golang/example/hello
```

#### Updating Binaries

To update an installed binary, use the `update` command:

```
$ bingo update hello
Updating hello package github.com/golang/example/hello
go: found github.com/golang/example/hello in github.com/golang/example v0.0.0-20170904185048-46695d81d1fa
Done
```

*NOTE*: By default, the resulting package version will be determined by Go's version resolution rules.

##### Specifying Package Version

You can specify which version of a package to update to.

*NOTE*: The target version does not have to be newer than the existing version. i.e you can update to an older version of the package.

###### '@version' Syntax

_update example using @version syntax_
```
$ bingo update [email protected]
```

###### '--version' Option

_update example using --version option_
```
$ bingo update --version v1.2.3 hello
```

#### Uninstalling Binaries / Packages

Use the `uninstall` command to uninstall binaries:
Expand All @@ -133,13 +187,6 @@ hello

*NOTE*: Uninstalling a binary also removes the associated package folder.

#### Upgrading Binaries
*TBD*

Bingo doesn't yet have an `upgrade` command.

For now, you can uninstall, then re-install, a binary to get the latest version.

---------------
## Requirements

Expand Down
Loading

0 comments on commit d4d48d9

Please sign in to comment.