Skip to content

Commit

Permalink
0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
progrhyme committed Jul 4, 2020
1 parent ea93149 commit 4d76145
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 9 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 0.5.0 (2020-07-04)

Feature: ([#5](https://github.com/progrhyme/binq/pull/5))

- (CLI) Add `register` subcommand to add Item into Index
- (CLI) Add `deregister` subcommand to remove Item from Index
- (CLI) Add `modify` subcommand to edit properties of Item in Index
- (install, client) Verify checksum of downloaded item when it is provided by Item JSON

Change: ([#5](https://github.com/progrhyme/binq/pull/5))

- (schema/item) Rename struct ItemChecksums -> ItemChecksum

## 0.4.0 (2020-07-03)

Feature: ([#4](https://github.com/progrhyme/binq/pull/4))
Expand Down
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Typical commands to achieve this are following:

```sh
bin=/usr/local/bin # Change to your favorite path
version=0.4.0 # Make sure this is the latest
version=0.5.0 # Make sure this is the latest
os=darwin # or "linux" is supported
tmpfile=$(mktemp)
curl -Lo $tmpfile "https://github.com/progrhyme/binq/releases/download/v${version}/binq_${version}_${os}_amd64.zip"
Expand Down Expand Up @@ -58,9 +58,12 @@ binq [install] [-t|--target] SOURCE \
[GENERAL_OPTIONS]

# Other Commands
binq new # Create Item JSON for Index Server
binq revise # Add/Edit/Delete a version in Item JSON
binq version # Show binq version
binq new # Create Item JSON for Index Server
binq revise # Add/Edit/Delete a version in Item JSON
binq register # Register item JSON into Local Index Dataset
binq modify # Modify item properties on Local Index
binq deregister # Deregister item from Local Index Dataset
binq version # Show binq version

# Show help
binq [COMMAND] -h|--help
Expand Down Expand Up @@ -131,13 +134,33 @@ binq revise ITEM_JSON_FILE VERSION \
binq revise ITEM_JSON_FILE VERSION --delete [-y|--yes] [GENERAL_OPTIONS]
```

## Manipulate Local Index Dataset

You can interact with Index Dataset using `binq`, but currently CLI only supports Local Dataset in
filesystem.

Commands Syntax:

```sh
# Register or Update Item content on Local Index Dataset
binq register pato/to/root[/index.json] path/to/item.json \
[-n|--name NAME] [-p|--path PATH] [-y|--yes] [GENERAL_OPTIONS]

# Modify Item properties in Local Index Dataset
binq modify pato/to/root[/index.json] NAME \
[-n|--name NEW_NAME] [-p|--path PATH] [-y|--yes] [GENERAL_OPTIONS]

# Deregister Item from Local Index Dataset
binq deregister pato/to/root[/index.json] NAME [-y|--yes] [GENERAL_OPTIONS]
```

# Binq Index Server

`binq` refers to an index server to fetch meta data of an item when its identifier is specified
instead of full URL.
We call it **Binq Index Server**.

It contains the database of downloadable items with their URLs for `binq`.
It contains the dataset of downloadable items with their URLs for `binq`.
When `binq` send a request to the server, it responds a JSON data which contains information about
the item.

Expand Down
2 changes: 1 addition & 1 deletion binq.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package binq

const (
Version = "0.4.0"
Version = "0.5.0"
EnvKeyServer = "BINQ_SERVER"
)
2 changes: 1 addition & 1 deletion internal/cli/deregister.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func newDeregisterCmd(common *commonCmd) (self *deregisterCmd) {

func (cmd *deregisterCmd) usage() {
const help = `Summary:
Deregister an Item from {{.prog}} Index.
Deregister an Item from Local {{.prog}} Index Dataset.
Usage:
{{.prog}} {{.name}} pato/to/root[/index.json] NAME [-y|--yes] [GENERAL_OPTIONS]
Expand Down
3 changes: 3 additions & 0 deletions internal/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ Available Commands:
install (Default) # Install binary or archive item
new # Create item JSON for Index Server
revise # Add/Edit/Delete a version in item JSON
register # Register item JSON into Local Index Dataset
modify # Modify item properties on Local Index
deregister # Deregister item from Local Index Dataset
version # Show {{.prog}} version
Run "{{.prog}} COMMAND -h|--help" to see usage of each command.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func newModifyCmd(common *commonCmd) (self *modifyCmd) {

func (cmd *modifyCmd) usage() {
const help = `Summary:
Modify the indice properties of an Item in {{.prog}} Index.
Modify the indice properties of an Item in Local {{.prog}} Index Dataset.
Usage:
{{.prog}} {{.name}} pato/to/root[/index.json] NAME \
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func newRegisterCmd(common *commonCmd) (self *registerCmd) {

func (cmd *registerCmd) usage() {
const help = `Summary:
Register or Update Item content on {{.prog}} Index.
Register or Update Item content on Local {{.prog}} Index Dataset.
Usage:
{{.prog}} {{.name}} pato/to/root[/index.json] path/to/item.json \
Expand Down

0 comments on commit 4d76145

Please sign in to comment.