Skip to content

Commit

Permalink
version: v1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AmbitiousJun committed Nov 9, 2024
1 parent d4b9628 commit 8f12b3f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">live-server</h1>

<div align="center">
<a href="https://github.com/AmbitiousJun/live-server/tree/v1.5.2"><img src="https://img.shields.io/github/v/tag/AmbitiousJun/live-server"></img></a>
<a href="https://hub.docker.com/r/ambitiousjun/live-server/tags"><img src="https://img.shields.io/docker/image-size/ambitiousjun/live-server/v1.5.2"></img></a>
<a href="https://github.com/AmbitiousJun/live-server/tree/v1.6.0"><img src="https://img.shields.io/github/v/tag/AmbitiousJun/live-server"></img></a>
<a href="https://hub.docker.com/r/ambitiousjun/live-server/tags"><img src="https://img.shields.io/docker/image-size/ambitiousjun/live-server/v1.6.0"></img></a>
<a href="https://hub.docker.com/r/ambitiousjun/live-server/tags"><img src="https://img.shields.io/docker/pulls/ambitiousjun/live-server"></img></a>
<a href="https://goreportcard.com/report/github.com/AmbitiousJun/live-server"><img src="https://goreportcard.com/badge/github.com/AmbitiousJun/live-server"></img></a>
<img src="https://img.shields.io/github/license/AmbitiousJun/live-server"></img>
Expand Down Expand Up @@ -37,6 +37,22 @@ services:
docker-compose up -d
```

## 直接运行二进制

从 release 页下载对应的二进制文件

终端运行:

```shell
live-server -prod=true
```

程序默认运行在 `5666` 端口上,自定义端口:

```shell
live-server -prod=true -p 8880
```

## 请我喝杯 9.9💰 的 Luckin Coffee☕️

![](assets/2024-11-05-09-59-45.png)
5 changes: 4 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ mkdir -p dist
# 定义平台数组
platforms=("darwin/amd64" "darwin/arm64" "linux/386" "linux/arm" "linux/amd64" "linux/arm64" "windows/386" "windows/arm" "windows/amd64" "windows/arm64")

# 版本号
VERSION=v1.6.0

# 循环编译并重命名可执行文件
for platform in "${platforms[@]}"
do
Expand All @@ -19,7 +22,7 @@ do
GOOS=${platform_info[0]} GOARCH=${platform_info[1]}

# 构建可执行文件名
output_name="live-server-${GOOS}-${GOARCH}"
output_name="live-server-${GOOS}_${GOARCH}-${VERSION}"

# Windows平台特殊处理,添加.exe后缀
if [ "$GOOS" == "windows" ]; then
Expand Down
2 changes: 1 addition & 1 deletion internal/service/resolve/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func GetHandler(name string) (Handler, bool) {
// HelpDoc 输出所有解析处理器的帮助文档
func HelpDoc() string {
sb := strings.Builder{}
version := "v1.5.2"
version := "v1.6.0"

// 程序说明
sb.WriteString("\nlive-server " + version + " 帮助文档\n")
Expand Down

0 comments on commit 8f12b3f

Please sign in to comment.