Skip to content

Commit 7a4dce7

Browse files
committed
change all references to bindownloader to bindown
1 parent 117e37b commit 7a4dce7

13 files changed

+28
-28
lines changed

.goreleaser.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project_name: bindown
44
release:
55
github:
66
owner: WillAbides
7-
name: bindownloader
7+
name: bindown
88
before:
99
hooks:
1010
- script/lint

bindownloader.go renamed to bindown.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"bytes"

bindownloader_test.go renamed to bindown_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"io/ioutil"

bootstrapper/main.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
##/ this is the static part of bootstrap-bindownloader.sh
1+
##/ this is the static part of bootstrap-bindown.sh
22
##/ used in script/build-bootstrapper
33

44
FORMAT=tar.gz
5-
GITHUB_DOWNLOAD=https://github.com/WillAbides/bindownloader/releases/download
5+
GITHUB_DOWNLOAD=https://github.com/WillAbides/bindown/releases/download
66

77
usage() {
88
this=$1
99
cat <<EOT
10-
$this: download go binaries for WillAbides/bindownloader
10+
$this: download go binaries for WillAbides/bindown
1111
1212
Usage: $this [-b] bindir [-d]
1313
-b sets bindir or installation directory, Defaults to ./bin

cmd/bindown/config.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"path/filepath"
1010

1111
"github.com/alecthomas/kong"
12-
"github.com/willabides/bindownloader"
12+
"github.com/willabides/bindown"
1313
)
1414

1515
var configKongVars = kong.Vars{
@@ -29,7 +29,7 @@ type configCmd struct {
2929
type configFmtCmd struct{}
3030

3131
func (c configFmtCmd) Run() error {
32-
config, err := bindownloader.LoadConfigFile(cli.Configfile)
32+
config, err := bindown.LoadConfigFile(cli.Configfile)
3333
if err != nil {
3434
return err
3535
}
@@ -45,7 +45,7 @@ type configUpdateChecksumsCmd struct {
4545
}
4646

4747
func (d *configUpdateChecksumsCmd) Run(*kong.Context) error {
48-
config, err := bindownloader.LoadConfigFile(cli.Configfile)
48+
config, err := bindown.LoadConfigFile(cli.Configfile)
4949
if err != nil {
5050
return fmt.Errorf("error loading config from %q", cli.Configfile)
5151
}
@@ -58,7 +58,7 @@ func (d *configUpdateChecksumsCmd) Run(*kong.Context) error {
5858
}
5959

6060
for _, downloader := range downloaders {
61-
err = downloader.UpdateChecksum(bindownloader.UpdateChecksumOpts{
61+
err = downloader.UpdateChecksum(bindown.UpdateChecksumOpts{
6262
DownloaderName: binary,
6363
CellarDir: cli.CellarDir,
6464
TargetDir: binDir,
@@ -81,11 +81,11 @@ type configValidateCmd struct {
8181
}
8282

8383
func (d configValidateCmd) Run(kctx *kong.Context) error {
84-
config, err := bindownloader.LoadConfigFile(cli.Configfile)
84+
config, err := bindown.LoadConfigFile(cli.Configfile)
8585
if err != nil {
8686
return fmt.Errorf("error loading config from %q", cli.Configfile)
8787
}
88-
tmpDir, err := ioutil.TempDir("", "bindownloader")
88+
tmpDir, err := ioutil.TempDir("", "bindown")
8989
if err != nil {
9090
return err
9191
}
@@ -119,7 +119,7 @@ func (d configValidateCmd) Run(kctx *kong.Context) error {
119119
return err
120120
}
121121

122-
installOpts := bindownloader.InstallOpts{
122+
installOpts := bindown.InstallOpts{
123123
DownloaderName: binary,
124124
TargetDir: binDir,
125125
Force: true,

cmd/bindown/download.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"runtime"
77

88
"github.com/alecthomas/kong"
9-
"github.com/willabides/bindownloader"
9+
"github.com/willabides/bindown"
1010
)
1111

1212
var downloadKongVars = kong.Vars{
@@ -26,7 +26,7 @@ type downloadCmd struct {
2626
}
2727

2828
func (d *downloadCmd) Run(*kong.Context) error {
29-
config, err := bindownloader.LoadConfigFile(cli.Configfile)
29+
config, err := bindown.LoadConfigFile(cli.Configfile)
3030
if err != nil {
3131
return fmt.Errorf("error loading config from %q", cli.Configfile)
3232
}
@@ -41,7 +41,7 @@ os: %s
4141
arch: %s`, binary, d.OS, d.Arch)
4242
}
4343

44-
installOpts := bindownloader.InstallOpts{
44+
installOpts := bindown.InstallOpts{
4545
DownloaderName: binary,
4646
TargetDir: binDir,
4747
Force: d.Force,

downloader.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"fmt"
@@ -182,7 +182,7 @@ got: %s`, targetFile, d.Checksum, result)
182182
type UpdateChecksumOpts struct {
183183
// DownloaderName is the downloader's key from the config file
184184
DownloaderName string
185-
// CellarDir is the directory where downloads and extractions will be placed. Default is a <TargetDir>/.bindownloader
185+
// CellarDir is the directory where downloads and extractions will be placed. Default is a <TargetDir>/.bindown
186186
CellarDir string
187187
// TargetDir is the directory where the executable should end up
188188
TargetDir string
@@ -192,7 +192,7 @@ type UpdateChecksumOpts struct {
192192
func (d *Downloader) UpdateChecksum(opts UpdateChecksumOpts) error {
193193
cellarDir := opts.CellarDir
194194
if cellarDir == "" {
195-
cellarDir = filepath.Join(opts.TargetDir, ".bindownloader")
195+
cellarDir = filepath.Join(opts.TargetDir, ".bindown")
196196
}
197197

198198
downloadDir := filepath.Join(cellarDir, "downloads", d.downloadsSubName())
@@ -221,7 +221,7 @@ func (d *Downloader) UpdateChecksum(opts UpdateChecksumOpts) error {
221221
type InstallOpts struct {
222222
// DownloaderName is the downloader's key from the config file
223223
DownloaderName string
224-
// CellarDir is the directory where downloads and extractions will be placed. Default is a <TargetDir>/.bindownloader
224+
// CellarDir is the directory where downloads and extractions will be placed. Default is a <TargetDir>/.bindown
225225
CellarDir string
226226
// TargetDir is the directory where the executable should end up
227227
TargetDir string
@@ -242,7 +242,7 @@ func (d *Downloader) Install(opts InstallOpts) error {
242242
d.setDefaultBinName(opts.DownloaderName)
243243
cellarDir := opts.CellarDir
244244
if cellarDir == "" {
245-
cellarDir = filepath.Join(opts.TargetDir, ".bindownloader")
245+
cellarDir = filepath.Join(opts.TargetDir, ".bindown")
246246
}
247247

248248
downloadDir := filepath.Join(cellarDir, "downloads", d.downloadsSubName())

downloader_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"os"

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/willabides/bindownloader
1+
module github.com/willabides/bindown
22

33
go 1.12
44

script/release

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CDPATH="" cd -- "$(dirname -- "$(dirname -- "$0")")"
77
make -s bin/goreleaser bin/semver-next
88

99
GITHUB_SHA="${GITHUB_SHA:-"$(git rev-parse HEAD)"}"
10-
GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-"WillAbides/bindownloader"}"
10+
GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-"WillAbides/bindown"}"
1111

1212
bin/semver-next "$GITHUB_REPOSITORY" -r "$GITHUB_SHA" --create-tag
1313

script/upload-release-bootstrap

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ AUTH_HEADER="Authorization: token $GITHUB_TOKEN"
1818

1919
TAG="$(grep "^TAG=" dist/bootstrap-bindown.sh | cut -d\" -f2)"
2020

21-
release_id="$(curl -s -H "$AUTH_HEADER" "https://api.github.com/repos/WillAbides/bindownloader/releases/tags/$TAG" | jq .id)"
22-
upload_url="https://uploads.github.com/repos/WillAbides/bindownloader/releases/$release_id/assets?name=bootstrap-bindown.sh"
21+
release_id="$(curl -s -H "$AUTH_HEADER" "https://api.github.com/repos/WillAbides/bindown/releases/tags/$TAG" | jq .id)"
22+
upload_url="https://uploads.github.com/repos/WillAbides/bindown/releases/$release_id/assets?name=bootstrap-bindown.sh"
2323
echo "$upload_url"
2424

2525
file_content="$(cat dist/bootstrap-bindown.sh)"

testhelper_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"io/ioutil"

util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package bindownloader
1+
package bindown
22

33
import (
44
"crypto/sha256"

0 commit comments

Comments
 (0)