diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 550905c..aedcffd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,5 +25,5 @@ jobs: - name: Build run: | - go build -v ./cmd/upx.go + go build -v ./cmd/upx ./upx -v diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 9590929..6a8459c 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-go@v2 - name: Build Upx run: | - go build ./cmd/upx.go + go build ./cmd/upx ./upx login "${{ env.UPYUN_RELEASE_BUCKET }}" "${{ env.UPYUN_RELEASE_USERNAME }}" "${{ env.UPYUN_RELEASE_PASSWORD }}" - name: Run GoReleaser diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba72ddf..4b2e22c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,5 +50,5 @@ jobs: run: go mod download - name: Test run: | - go build -v ./cmd/upx.go + go build -v ./cmd/upx go test -v ./... diff --git a/.gitignore b/.gitignore index 30c7322..d3c9b73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -upx *.swo *.swp *.swn diff --git a/.goreleaser.yml b/.goreleaser.yml index 388f8b3..c91b354 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,7 +3,7 @@ before: - go mod download builds: - id: "upx" - main: ./cmd/ + main: ./cmd/upx env: - CGO_ENABLED=0 binary: upx diff --git a/Makefile b/Makefile index 31af0e1..1dc6249 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PROJ_DIR= $(ROOT)/src/upyun.com PWD= $(shell pwd) app: - go build -o $(APP) ./cmd/upx.go + go build -o $(APP) ./cmd/upx/ test: go test -v . diff --git a/README.md b/README.md index dfd3aed..a7d0ec5 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ $ cd upx && make or ``` -$ go get -u github.com/upyun/upx@v0.4.0 +$ go get -u github.com/upyun/upx/cmd/upx@master ``` ### Windows diff --git a/cmd/upx.go b/cmd/upx/upx.go similarity index 100% rename from cmd/upx.go rename to cmd/upx/upx.go