Skip to content

Commit

Permalink
update:build:Compression program
Browse files Browse the repository at this point in the history
  • Loading branch information
alicfeng committed Mar 27, 2020
1 parent a764d2e commit 75ec402
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
*.out
/.idea
/output
/release
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
GC=go
MAIN_GO_FILE=mysql_markdown.go
RELEASE_DIR=release

build-unix :
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ${GC} build -ldflags -w -o ${RELEASE_DIR}/mysql_markdown_unix ${MAIN_GO_FILE}

build-mac :
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 ${GC} build -ldflags -w -o ${RELEASE_DIR}/mysql_markdown_mac ${MAIN_GO_FILE}

build-win :
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ${GC} build -ldflags -w -o ${RELEASE_DIR}/mysql_markdown_win ${MAIN_GO_FILE}

build :
make build-unix
make build-mac
make build-win

release :
make build
upx release/mysql_markdown_*
tar -czvf release/mysql_markdown_mac.tar.gz -C release/ mysql_markdown_mac
tar -czvf release/mysql_markdown_unix.tar.gz -C release/ mysql_markdown_unix
tar -czvf release/mysql_markdown_win.tar.gz -C release/ mysql_markdown_win

clean :
@if [ -d ${RELEASE_DIR} ] ; then rm -rf ${RELEASE_DIR}; fi
20 changes: 2 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,7 @@ ___


#### 安装

###### 1.curl
```bash
curl -fsSL "https://raw.githubusercontent.com/alicfeng/mysql_markdown/master/install" | sudo sh
```

###### 2.source
```bash
git clone https://github.com/alicfeng/mysql_markdown.git
cd mysql_markdown
go get "github.com/go-sql-driver/mysql"
go build -o /usr/local/bin/mysql_markdown mysql_markdown.go
chmod +x /usr/local/bin/mysql_markdown
```

###### 3.download
[https://dl.samego.com](https://dl.samego.com/#files%2Fpackage%2Fmysql_markdown)
[releases download](https://github.com/alicfeng/mysql_markdown/releases)



Expand Down Expand Up @@ -102,4 +86,4 @@ md转其它类型的文档推荐使用 `typora` 工具 它支持如下转换格


###### MD文件转PDF
![MySQL 表结构生成 Markdown转PDF 文档](https://upload-images.jianshu.io/upload_images/1678789-5b5d3abfc3454352.png)
![MySQL 表结构生成 Markdown转PDF 文档](https://upload-images.jianshu.io/upload_images/1678789-5b5d3abfc3454352.png)
5 changes: 0 additions & 5 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion install → install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

dl_dir="https://dl.samego.com/#files%2Fpackage%2Fmysql_markdown/"
dl_dir="https://github.com/alicfeng/mysql_markdown/releases/"

if [[ "$(uname)" == "Darwin" ]]; then
# Mac OS X
Expand Down

0 comments on commit 75ec402

Please sign in to comment.