Skip to content

Commit

Permalink
Rename sbrepo to binrep
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuki committed Oct 14, 2017
1 parent 8d9a523 commit cbe060a
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/sbrepo
/binrep
/dist/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COMMIT = $$(git describe --always)
PKG = github.com/yuuki/sbrepo
PKG = github.com/yuuki/binrep
PKGS = $$(go list ./... | grep -v vendor)

all: build
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
sbrepo
binrep
======

Simple static binary repository manager on Amazon S3 as backend storage.

# Overview

`sbrepo` provides a simple way to store and deploy your static binary files such as Go binary. sbrepo pushes the binary files into your S3 bucket, builds the directory layout like `go get` does on the bucket, and pulls the binary files from the bucket.
`binrep` provides a simple way to store and deploy your static binary files such as Go binary. binrep pushes the binary files into your S3 bucket, builds the directory layout like `go get` does on the bucket, and pulls the binary files from the bucket.

The deployment of (internel) tools written by Go takes a lot more works, especially in the environment with many servers, than that of no-dependent LL scripts such as shell script, Perl, Python, Ruby). Git is an informat approach to the deployment, but git is not for binary management. The next approach is a package manager such apt or yum, but it takes a lot of trouble to make packages. The other approach is just to use a HTTP file server including S3, but it needs uniform and accessible location of the binary files and version management. There, `sbrepo` resolves the problem of the binary management.
The deployment of (internel) tools written by Go takes a lot more works, especially in the environment with many servers, than that of no-dependent LL scripts such as shell script, Perl, Python, Ruby). Git is an informat approach to the deployment, but git is not for binary management. The next approach is a package manager such apt or yum, but it takes a lot of trouble to make packages. The other approach is just to use a HTTP file server including S3, but it needs uniform and accessible location of the binary files and version management. There, `binrep` resolves the problem of the binary management.

# Usage

## Prepareation

- Create S3 bucket for `sbrepo`.
- Install `sbrepo` binary, see https://github.com/yuuki/sbrepo/releases .
- Create S3 bucket for `binrep`.
- Install `binrep` binary, see https://github.com/yuuki/binrep/releases .

## Commands

```
sbrepo ls --endpoint s3://<bucket> github.com/yuuki/droot
sbrepo push --endpoint s3://<bucket> github.com/yuuki/droot ./droot
sbrepo pull --endpoint s3://<bucket> github.com/yuuki/droot /usr/local/bin
sbrepo sync --endpoint s3://<bucket> /usr/local/bin
binrep ls --endpoint s3://<bucket> github.com/yuuki/droot
binrep push --endpoint s3://<bucket> github.com/yuuki/droot ./droot
binrep pull --endpoint s3://<bucket> github.com/yuuki/droot /usr/local/bin
binrep sync --endpoint s3://<bucket> /usr/local/bin
```

# Directory layout on S3 bucket
Expand All @@ -36,7 +36,7 @@ s3://<bucket>/<host>/<user>/<project>/<date>/
The example below.

```
s3://sbrepo-repository/
s3://binrep-repository/
|-- github.com/
-- yuuki/
-- droot/
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/pkg/errors"

"github.com/yuuki/sbrepo/pkg/command"
"github.com/yuuki/binrep/pkg/command"
)

// CLI is the command line object.
Expand Down Expand Up @@ -58,7 +58,7 @@ func (cli *CLI) Run(args []string) int {
}

var helpText = `
Usage: sbrepo [options]
Usage: binrep [options]
static binary repository.
Expand All @@ -82,7 +82,7 @@ func (cli *CLI) prepareFlags(help string) *flag.FlagSet {
}

var pushHelpText = `
Usage: sbrepo push [options] <host>/<user>/<project> /path/to/binary
Usage: binrep push [options] <host>/<user>/<project> /path/to/binary
push binary.
Expand Down Expand Up @@ -113,7 +113,7 @@ func (cli *CLI) doPush(args []string) error {
}

var pullHelpText = `
Usage: sbrepo pull [options] <host>/<user>/<project> /path/to/binary
Usage: binrep pull [options] <host>/<user>/<project> /path/to/binary
pull binary.
Expand Down
2 changes: 1 addition & 1 deletion pkg/command/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/yuuki/sbrepo/pkg/s3"
"github.com/yuuki/binrep/pkg/s3"
)

type PullParam struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/command/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/pkg/errors"
"github.com/yuuki/sbrepo/pkg/meta"
"github.com/yuuki/sbrepo/pkg/s3"
"github.com/yuuki/binrep/pkg/meta"
"github.com/yuuki/binrep/pkg/s3"
)

type PushParam struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/aws/aws-sdk-go/service/s3/s3manager"
"github.com/aws/aws-sdk-go/service/s3/s3manager/s3manageriface"
"github.com/pkg/errors"
"github.com/yuuki/sbrepo/pkg/meta"
"github.com/yuuki/binrep/pkg/meta"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

// Name is application name
const Name = "sbrepo"
const Name = "binrep"

// Version is application version
const Version string = "0.1.0"
Expand Down

0 comments on commit cbe060a

Please sign in to comment.