Skip to content

Commit

Permalink
fix: 動作に関係ない部分の変更
Browse files Browse the repository at this point in the history
  • Loading branch information
apxxxxxxe committed Dec 11, 2022
1 parent f7b5a1f commit b9a0473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
6 changes: 3 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

version="v$(grep version shioriUpdater.go | grep -oE '[0-9]\.[0-9]\.[0-9]')"
if [ $? -eq 1 ]; then
Expand All @@ -8,11 +8,11 @@ fi

latest_version=$(git describe --tags --abbrev=0)

if [ ${version} == ${latest_version} ]; then
if [ "${version}" == "${latest_version}" ]; then
echo "error: this version is the same as the latest one" 1>&2
exit 1
fi

GOOS=windows GOARCH=386 go build -o pkg/shioriupdater_windows_386.exe
GOOS=windows GOARCH=amd64 go build -o pkg/shioriupdater_windows_amd64.exe

ghr "${version}" pkg/
23 changes: 1 addition & 22 deletions shioriUpdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

const name = "shioriupdater"
const version = "1.1.6"
const version = "1.1.7"

var shioriPaths = [][]string{
{"yaya.dll", "https://github.com/ponapalt/yaya-shiori/releases/latest/download/yaya.zip"},
Expand All @@ -49,7 +49,6 @@ func getFileVersion(path string) (int, error) {
return ver, nil
}

// {{{ isProcExist(name string) bool
func isProcExist(name string) bool {
var result bool

Expand All @@ -69,16 +68,10 @@ func isProcExist(name string) bool {
return result
}

// }}}

// {{{ formatTime(t time.Time) string
func formatTime(t time.Time) string {
return t.Format(time.RFC1123)
}

// }}}

// {{{ updateSelf() bool
func updateSelf() bool {
latest, found, err := selfupdate.DetectLatest("apxxxxxxe/shioriupdater")
if err != nil {
Expand All @@ -105,9 +98,6 @@ func updateSelf() bool {
return true
}

// }}}

// {{{ downloadFile(tempDir, url string) (string, error)
func downloadFile(tempDir, url string) (string, error) {
resp, err := http.Get(url)
if err != nil {
Expand All @@ -125,9 +115,6 @@ func downloadFile(tempDir, url string) (string, error) {
return out.Name(), err
}

// }}}

// {{{ Unzip(src, dest string) error
func Unzip(src, dest string) error {
r, err := zip.OpenReader(src)
if err != nil {
Expand Down Expand Up @@ -171,9 +158,6 @@ func Unzip(src, dest string) error {
return nil
}

// }}}

// {{{ walkDir(dir string) ([]string, error)
func walkDir(dir string) []string {
files, err := ioutil.ReadDir(dir)
if err != nil {
Expand All @@ -197,9 +181,6 @@ func walkDir(dir string) []string {
return paths
}

// }}}

// {{{ getShioriFiles() (map[string]string, error)
func getShioriFiles(tempDir string) (map[string]string, error) {
result := map[string]string{}

Expand Down Expand Up @@ -244,8 +225,6 @@ func getShioriFiles(tempDir string) (map[string]string, error) {
return result, nil
}

// }}}

func main() {

var baseDir string
Expand Down

0 comments on commit b9a0473

Please sign in to comment.