Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.

Commit

Permalink
Add packaging script
Browse files Browse the repository at this point in the history
  • Loading branch information
spiegel-im-spiegel committed May 13, 2018
1 parent be5f451 commit 8ccb4ed
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@

# Other folders
vendor/
dist/
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Windows 環境で [GCC] のインストールを行う場合は [MinGW-w64] を
$ dep ensure
```

[リリースページ](https://github.com/spiegel-im-spiegel/jvnman/releases/latest)では Windows 64bit 用のバイナリのみ提供しています。

## [jvnman] の使い方

```
Expand Down Expand Up @@ -90,7 +92,7 @@ $ jvnman init

[SQLite] データベース・ファイルを初期化して作り直したい場合も `jvnman init` コマンドで初期化できます。

データベースのテーブル仕様はリポジトリの [jvnman/docs/](https://github.com/spiegel-im-spiegel/jvnman/tree/master/docs) フォルダ以下にあります。
データベースのテーブル仕様はリポジトリの [docs/](https://github.com/spiegel-im-spiegel/jvnman/tree/master/docs) フォルダ以下にあります。

### 脆弱性情報の蓄積・更新

Expand Down Expand Up @@ -247,7 +249,7 @@ $ jvnman info -f html JVNDB-2018-002862 > JVNDB-2018-002862.html
$ jvnman info -t template-info.md JVNDB-2018-002862
```

[jvnman] が使用している標準のテンプレートファイルはリポジトリの [jvnman/report/assets/](https://github.com/spiegel-im-spiegel/jvnman/tree/master/report/assets) フォルダにあります。
[jvnman] が使用している標準のテンプレートファイルはリポジトリの [report/assets/](https://github.com/spiegel-im-spiegel/jvnman/tree/master/report/assets) フォルダにあります。
参考にしてください。

### ログ出力について
Expand Down
33 changes: 33 additions & 0 deletions package-w64.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
setlocal
set pacf=jvnman_%~1_windows_64bit.zip
echo package to %pacf%
pause

dep ensure
if ERRORLEVEL 1 echo fail dep && goto :end

go test -v ./...
if ERRORLEVEL 1 echo fail go test && goto :end

go run main.go version
go build -o dist/jvnman.exe -ldflags "-X github.com/spiegel-im-spiegel/jvnman/facade.Version=%~1" .
if ERRORLEVEL 1 echo fail go build && goto :end

pushd dist
jvnman.exe version

copy /v /b ..\LICENSE .
copy /v /b ..\README.md .
7z.exe a -tzip %pacf% jvnman.exe LICENSE README.md
if ERRORLEVEL 1 echo fail packaging %pacf% && goto :end

gpg --detach-sign -u spiegel.im.spiegel@gmail.com -o %pacf%.sig %pacf%
if ERRORLEVEL 1 echo fail signing %pacf% && goto :end

gpg -d %pacf%.sig

:end
popd
endlocal
exit /b 0

0 comments on commit 8ccb4ed

Please sign in to comment.