Skip to content

Commit

Permalink
refactor: code format
Browse files Browse the repository at this point in the history
  • Loading branch information
voidint committed Aug 20, 2024
1 parent c233146 commit 3cd48f5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: go

sudo: false

go:
go:
- master

before_install:
Expand All @@ -15,4 +15,4 @@ script:
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...

after_success:
- bash <(curl -s https://codecov.io/bash)
- bash <(curl -s https://codecov.io/bash)
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GO = CGO_ENABLED=0 GO111MODULE=on GOPROXY=https://goproxy.cn,direct go
BUILD_DATE := $(shell date '+%Y-%m-%d %H:%M:%S')
GIT_BRANCH := $(shell git symbolic-ref --short -q HEAD)
GIT_COMMIT_HASH := $(shell git rev-parse HEAD|cut -c 1-8)
GIT_COMMIT_HASH := $(shell git rev-parse HEAD|cut -c 1-8)
GO_FLAGS := -v -ldflags="-X 'github.com/voidint/g/build.Built=$(BUILD_DATE)' -X 'github.com/voidint/g/build.GitCommit=$(GIT_COMMIT_HASH)' -X 'github.com/voidint/g/build.GitBranch=$(GIT_BRANCH)'"


Expand Down Expand Up @@ -76,16 +76,16 @@ clean:
rm -f coverage.txt

upgrade-deps:
go get -u -v github.com/urfave/cli/v2@latest
go get -u -v github.com/Masterminds/semver/v3@latest
go get -u -v github.com/PuerkitoBio/goquery@latest
go get -u -v github.com/mholt/archiver/v3@latest
go get -u -v github.com/schollz/progressbar/v3@latest
go get -u -v github.com/daviddengcn/go-colortext@latest
go get -u -v github.com/fatih/color@latest
go get -u -v github.com/k0kubun/go-ansi@latest
go get -u -v github.com/agiledragon/gomonkey/v2@latest
go get -u -v github.com/stretchr/testify@latest
go get -u -v golang.org/x/text@latest
go get -u -v github.com/urfave/cli/v2@latest
go get -u -v github.com/Masterminds/semver/v3@latest
go get -u -v github.com/PuerkitoBio/goquery@latest
go get -u -v github.com/mholt/archiver/v3@latest
go get -u -v github.com/schollz/progressbar/v3@latest
go get -u -v github.com/daviddengcn/go-colortext@latest
go get -u -v github.com/fatih/color@latest
go get -u -v github.com/k0kubun/go-ansi@latest
go get -u -v github.com/agiledragon/gomonkey/v2@latest
go get -u -v github.com/stretchr/testify@latest
go get -u -v golang.org/x/text@latest

.PHONY: all build install install-tools lint test test-coverage view-coverage package clean upgrade-deps build-linux build-darwin build-windows build-linux-386 build-linux-amd64 build-linux-arm build-linux-arm64 build-linux-s390x build-darwin-amd64 build-darwin-arm64 build-windows-386 build-windows-amd64 build-windows-arm build-windows-arm64
2 changes: 1 addition & 1 deletion gbb.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
"value": "$(git symbolic-ref --short -q HEAD)"
}
]
}
}
4 changes: 1 addition & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function get_arch() {
;;
"armv6l" | "armv7l")
echo "arm"
;;
;;
"s390x")
echo "s390x"
;;
Expand Down Expand Up @@ -58,7 +58,6 @@ export PATH="${HOME}/.g/bin:${GOROOT}/bin:${GOPATH}/bin:$PATH"
export G_MIRROR=https://golang.google.cn/dl/
EOF


if [ -x "$(command -v bash)" ]; then
cat >>${HOME}/.bashrc <<-'EOF'
Expand All @@ -75,7 +74,6 @@ export G_MIRROR=https://golang.google.cn/dl/
EOF
fi


echo -e "\nTo configure your current shell, run:\nsource \"$HOME/.g/env\""

exit 0
Expand Down
4 changes: 2 additions & 2 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function package() {
printf "[2/2] Package\n"
if [ ${os} == "windows" ]; then
zip g${release}.${os}-${arch}.zip ./g.exe
shasum -a 256 g${release}.${os}-${arch}.zip >> sha256sum.txt
shasum -a 256 g${release}.${os}-${arch}.zip >>sha256sum.txt
else
tar -czv -f g${release}.${os}-${arch}.tar.gz ./g
shasum -a 256 g${release}.${os}-${arch}.tar.gz >> sha256sum.txt
shasum -a 256 g${release}.${os}-${arch}.tar.gz >>sha256sum.txt
fi
}

Expand Down

0 comments on commit 3cd48f5

Please sign in to comment.