Skip to content

Commit

Permalink
feat: bump v0.1.3 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
blizard863 authored Jun 9, 2024
1 parent 0bf2a8b commit f6f5bee
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 45 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## v0.1.3 (2024-06-08)

This release focuses on enhancing code readability, ensuring compliance with Golang standards, and upgrading our CI/CD infrastructure. We’ve also improved error handling mechanisms and updated dependencies to maintain security and performance.

### Improvements
- **Code Readability**: Refactored code to enhance readability and maintainability.
- **Golang Standards Compliance**: Updated code to fully comply with Golang coding standards and best practices.
- **CI/CD Enhancements**: Improved CI/CD pipelines to ensure more reliable builds and deployments.
- **Error Handling**: Improved error handling mechanisms throughout the codebase.
- **Dependencies**: Updated dependencies to the latest versions for better security and performance.

## v0.1.2 (2024-04-15)

This release introduces a set of code optimizations, improvements to documentation, and an extension of the testing suite. This is a patch release and does not contain any breaking changes or new features. It is backwards compatible with v0.1.1.
Expand Down
20 changes: 13 additions & 7 deletions Makefile.cross-compiles
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
export PATH := $(PATH):`go env GOPATH`/bin
LDFLAGS := -s -w

os-archs=darwin:amd64 darwin:arm64 freebsd:amd64 linux:amd64 linux:arm linux:arm64 windows:amd64 windows:arm64 linux:mips64 linux:mips64le linux:mips:softfloat linux:mipsle:softfloat linux:riscv64 android:arm64
os-archs=darwin:amd64 darwin:arm64 freebsd:amd64 linux:amd64 linux:arm linux:arm:6 linux:arm64 windows:amd64 windows:arm64 linux:mips64 linux:mips64le linux:mips:softfloat linux:mipsle:softfloat linux:riscv64 android:arm64

all: build

build: app

app:
@$(foreach n, $(os-archs),\
os=$(shell echo "$(n)" | cut -d : -f 1);\
arch=$(shell echo "$(n)" | cut -d : -f 2);\
gomips=$(shell echo "$(n)" | cut -d : -f 3);\
target_suffix=$${os}_$${arch};\
echo "Build $${os}-$${arch}...";\
@$(foreach n, $(os-archs), \
os=$(shell echo "$(n)" | cut -d : -f 1); \
arch=$(shell echo "$(n)" | cut -d : -f 2); \
extra=$(shell echo "$(n)" | cut -d : -f 3); \
flags=''; \
target_suffix=$${os}_$${arch}; \
if [ "$${os}" = "linux" ] && [ "$${arch}" = "arm" ] && [ "$${extra}" != "" ] ; then \
flags=GOARM=$${extra}; \
target_suffix=$${os}_$${arch}_$${extra}; \
elif [ "$${os}" = "linux" ] && [ "$${arch}" = "mips" ] && [ "$${extra}" != "" ] ; then \
flags=GOMIPS=$${extra}; \
fi; \
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -o ./release/tiny-frpc_$${target_suffix} ./cmd/frpc;\
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -tags nssh -o ./release/tiny-frpc-ssh_$${target_suffix} ./cmd/frpc;\
echo "Build $${os}-$${arch} done";\
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/gofrp/tiny-frpc
go 1.21

require (
github.com/pelletier/go-toml/v2 v2.2.1
github.com/pelletier/go-toml/v2 v2.2.2
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.23.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/sys v0.20.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand All @@ -16,10 +18,15 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
77 changes: 43 additions & 34 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,57 @@ mkdir -p ./release/packages

os_all='linux windows darwin freebsd android'
arch_all='386 amd64 arm arm64 mips64 mips64le mips mipsle riscv64'
extra_all='_ 6'

cd ./release

for os in $os_all; do
for arch in $arch_all; do
tiny_frpc_dir_name="tiny-frpc_${tiny_frpc_version}_${os}_${arch}"
tiny_frpc_path="./packages/tiny-frpc_${tiny_frpc_version}_${os}_${arch}"

if [ "x${os}" = x"windows" ]; then
if [ ! -f "./tiny-frpc_${os}_${arch}.exe" ]; then
continue
fi
if [ ! -f "./tiny-frpc-ssh_${os}_${arch}.exe" ]; then
continue
fi
mkdir ${tiny_frpc_path}
mv ./tiny-frpc_${os}_${arch}.exe ${tiny_frpc_path}/tiny-frpc.exe
mv ./tiny-frpc-ssh_${os}_${arch}.exe ${tiny_frpc_path}/tiny-frpc-ssh.exe
else
if [ ! -f "./tiny-frpc_${os}_${arch}" ]; then
continue
for extra in $extra_all; do
suffix="${os}_${arch}"
if [ "x${extra}" != x"_" ]; then
suffix="${os}_${arch}_${extra}"
fi
if [ ! -f "./tiny-frpc-ssh_${os}_${arch}" ]; then
continue
tiny_frpc_dir_name="tiny-frpc_${tiny_frpc_version}_${suffix}"
tiny_frpc_path="./packages/tiny-frpc_${tiny_frpc_version}_${suffix}"

if [ "x${os}" = x"windows" ]; then
if [ ! -f "./tiny-frpc_${os}_${arch}.exe" ]; then
continue
fi
if [ ! -f "./tiny-frpc-ssh_${os}_${arch}.exe" ]; then
continue
fi
mkdir ${tiny_frpc_path}
mv ./tiny-frpc_${os}_${arch}.exe ${tiny_frpc_path}/frpc.exe
mv ./tiny-frpc-ssh_${os}_${arch}.exe ${tiny_frpc_path}/tiny-frpc-ssh.exe
else
if [ ! -f "./tiny-frpc_${suffix}" ]; then
continue
fi
if [ ! -f "./tiny-frpc-ssh_${suffix}" ]; then
continue
fi
mkdir ${tiny_frpc_path}
mv ./tiny-frpc_${suffix} ${tiny_frpc_path}/tiny-frpc
mv ./tiny-frpc-ssh_${suffix} ${tiny_frpc_path}/tiny-frpc-ssh
fi
mkdir ${tiny_frpc_path}
mv ./tiny-frpc_${os}_${arch} ${tiny_frpc_path}/tiny-frpc
mv ./tiny-frpc-ssh_${os}_${arch} ${tiny_frpc_path}/tiny-frpc-ssh
fi
cp ../LICENSE ${tiny_frpc_path}
cp -f ../conf/frpc.toml ${tiny_frpc_path}
cp ../LICENSE ${tiny_frpc_path}
cp -f ../conf/frpc.toml ${tiny_frpc_path}

# packages
cd ./packages
if [ "x${os}" = x"windows" ]; then
zip -rq ${tiny_frpc_dir_name}.zip ${tiny_frpc_dir_name}
else
tar -zcf ${tiny_frpc_dir_name}.tar.gz ${tiny_frpc_dir_name}
fi
cd ..
rm -rf ${tiny_frpc_path}
# packages
cd ./packages
if [ "x${os}" = x"windows" ]; then
zip -rq ${tiny_frpc_dir_name}.zip ${tiny_frpc_dir_name}
echo "windows"
else
tar -zcf ${tiny_frpc_dir_name}.tar.gz ${tiny_frpc_dir_name}
echo "linux+mac"
fi
cd ..
rm -rf ${tiny_frpc_path}
done
done
done

cd -
cd -
2 changes: 1 addition & 1 deletion pkg/util/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package version

var version = "0.1.2"
var version = "0.1.3"

func Full() string {
return version
Expand Down

0 comments on commit f6f5bee

Please sign in to comment.