Skip to content

Commit

Permalink
添加构建脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
ystyle committed Jan 18, 2019
1 parent 6243d97 commit 9f4bec6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
*.epub
*.txt
*.exe
*.exe
TmdTextEpub-*
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ Usage of TmdTextEpub.exe:
```

### 示例
1. [点击下载](https://github.com/ystyle/TmdTextEpub/releases)
1. 把小说和`TmdTextEpub.exe`放到`D`
2. 按以下其中一种方法打开命令行
1. 按以下其中一种方法打开命令行
-`win + r` 输入 `cmd` 然后输入以下命令
-`win + x + i` 输入以下命令

Expand Down
12 changes: 12 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
$env:GOOS="windows"
go build -ldflags "-s -w" -o TmdTextEpub.exe main.go

$env:GOOS="linux"
go build -ldflags "-s -w" -o TmdTextEpub-linux main.go

$env:GOOS="darwin"
go build -ldflags "-s -w" -o TmdTextEpub-darwin main.go


echo "done!"
Start-Sleep -Seconds 20 main.go
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GOOS=windows go build -ldflags "-s -w" -o TmdTextEpub.exe main.go

GOOS=linux go build -ldflags "-s -w" -o TmdTextEpub-linux main.go

GOOS=darwin go build -ldflags "-s -w" -o TmdTextEpub-darwin main.go

echo "done!"

0 comments on commit 9f4bec6

Please sign in to comment.