diff --git a/.goreleaser.yml b/.goreleaser.yml index 3ae69edf..2d06e13b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,7 +4,7 @@ project_name: bindown release: github: owner: WillAbides - name: bindownloader + name: bindown before: hooks: - script/lint diff --git a/bindownloader.go b/bindown.go similarity index 98% rename from bindownloader.go rename to bindown.go index ca414263..c650ea27 100644 --- a/bindownloader.go +++ b/bindown.go @@ -1,4 +1,4 @@ -package bindownloader +package bindown import ( "bytes" diff --git a/bindownloader_test.go b/bindown_test.go similarity index 99% rename from bindownloader_test.go rename to bindown_test.go index 5308f296..f0195d5a 100644 --- a/bindownloader_test.go +++ b/bindown_test.go @@ -1,4 +1,4 @@ -package bindownloader +package bindown import ( "io/ioutil" diff --git a/bootstrapper/main.sh b/bootstrapper/main.sh index 84887352..a618e265 100644 --- a/bootstrapper/main.sh +++ b/bootstrapper/main.sh @@ -1,13 +1,13 @@ -##/ this is the static part of bootstrap-bindownloader.sh +##/ this is the static part of bootstrap-bindown.sh ##/ used in script/build-bootstrapper FORMAT=tar.gz -GITHUB_DOWNLOAD=https://github.com/WillAbides/bindownloader/releases/download +GITHUB_DOWNLOAD=https://github.com/WillAbides/bindown/releases/download usage() { this=$1 cat </.bindownloader + // CellarDir is the directory where downloads and extractions will be placed. Default is a /.bindown CellarDir string // TargetDir is the directory where the executable should end up TargetDir string @@ -192,7 +192,7 @@ type UpdateChecksumOpts struct { func (d *Downloader) UpdateChecksum(opts UpdateChecksumOpts) error { cellarDir := opts.CellarDir if cellarDir == "" { - cellarDir = filepath.Join(opts.TargetDir, ".bindownloader") + cellarDir = filepath.Join(opts.TargetDir, ".bindown") } downloadDir := filepath.Join(cellarDir, "downloads", d.downloadsSubName()) @@ -221,7 +221,7 @@ func (d *Downloader) UpdateChecksum(opts UpdateChecksumOpts) error { type InstallOpts struct { // DownloaderName is the downloader's key from the config file DownloaderName string - // CellarDir is the directory where downloads and extractions will be placed. Default is a /.bindownloader + // CellarDir is the directory where downloads and extractions will be placed. Default is a /.bindown CellarDir string // TargetDir is the directory where the executable should end up TargetDir string @@ -242,7 +242,7 @@ func (d *Downloader) Install(opts InstallOpts) error { d.setDefaultBinName(opts.DownloaderName) cellarDir := opts.CellarDir if cellarDir == "" { - cellarDir = filepath.Join(opts.TargetDir, ".bindownloader") + cellarDir = filepath.Join(opts.TargetDir, ".bindown") } downloadDir := filepath.Join(cellarDir, "downloads", d.downloadsSubName()) diff --git a/downloader_test.go b/downloader_test.go index 599623ce..7c8d5ff5 100644 --- a/downloader_test.go +++ b/downloader_test.go @@ -1,4 +1,4 @@ -package bindownloader +package bindown import ( "os" diff --git a/go.mod b/go.mod index bc3109d6..8d2a8157 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/willabides/bindownloader +module github.com/willabides/bindown go 1.12 diff --git a/script/release b/script/release index d8a7c383..3428f851 100755 --- a/script/release +++ b/script/release @@ -7,7 +7,7 @@ CDPATH="" cd -- "$(dirname -- "$(dirname -- "$0")")" make -s bin/goreleaser bin/semver-next GITHUB_SHA="${GITHUB_SHA:-"$(git rev-parse HEAD)"}" -GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-"WillAbides/bindownloader"}" +GITHUB_REPOSITORY="${GITHUB_REPOSITORY:-"WillAbides/bindown"}" bin/semver-next "$GITHUB_REPOSITORY" -r "$GITHUB_SHA" --create-tag diff --git a/script/upload-release-bootstrap b/script/upload-release-bootstrap index b758d73f..811e2bbd 100755 --- a/script/upload-release-bootstrap +++ b/script/upload-release-bootstrap @@ -18,8 +18,8 @@ AUTH_HEADER="Authorization: token $GITHUB_TOKEN" TAG="$(grep "^TAG=" dist/bootstrap-bindown.sh | cut -d\" -f2)" -release_id="$(curl -s -H "$AUTH_HEADER" "https://api.github.com/repos/WillAbides/bindownloader/releases/tags/$TAG" | jq .id)" -upload_url="https://uploads.github.com/repos/WillAbides/bindownloader/releases/$release_id/assets?name=bootstrap-bindown.sh" +release_id="$(curl -s -H "$AUTH_HEADER" "https://api.github.com/repos/WillAbides/bindown/releases/tags/$TAG" | jq .id)" +upload_url="https://uploads.github.com/repos/WillAbides/bindown/releases/$release_id/assets?name=bootstrap-bindown.sh" echo "$upload_url" file_content="$(cat dist/bootstrap-bindown.sh)" diff --git a/testhelper_test.go b/testhelper_test.go index da0c8e15..ac0374cd 100644 --- a/testhelper_test.go +++ b/testhelper_test.go @@ -1,4 +1,4 @@ -package bindownloader +package bindown import ( "io/ioutil" diff --git a/util.go b/util.go index 7742761f..c5a86d45 100644 --- a/util.go +++ b/util.go @@ -1,4 +1,4 @@ -package bindownloader +package bindown import ( "crypto/sha256"