diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..d5a00ea --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,54 @@ +builds: + - binary: shadowfox + goos: + - darwin + - linux + goarch: + - 386 + - amd64 + env: + - CGO_ENABLED=0 + - binary: shadowfox + goos: + - windows + goarch: + - 386 + env: + - CGO_ENABLED=0 + hooks: + pre: rsrc -manifest manifest.xml -arch 386 -o shadowfox.syso + - binary: shadowfox + goos: + - windows + goarch: + - amd64 + env: + - CGO_ENABLED=0 + hooks: + pre: rsrc -manifest manifest.xml -arch amd64 -o shadowfox.syso +brew: + github: + owner: SrKomodo + name: homebrew-tap + folder: Formula + homepage: https://github.com/SrKomodo/shadowfox-updater + description: An automatic updater for ShadowFox +archive: + replacements: + windows: Windows + darwin: MacOS + linux: Linux + 386: x32 + amd64: x64 + files: + - none* +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/.travis.yml b/.travis.yml index 8aad2fb..267efac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,9 @@ language: go go: - "1.10" before_script: go get github.com/akavel/rsrc -script: go run compiler/compiler.go deploy: - provider: releases - api_key: $KEY +- provider: script skip_cleanup: true - file_glob: true - file: dist/**/* + script: curl -sL https://git.io/goreleaser | bash on: - tags: true \ No newline at end of file + tags: true diff --git a/compiler/compiler.go b/compiler/compiler.go deleted file mode 100644 index cfad4a9..0000000 --- a/compiler/compiler.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import ( - "os" - "os/exec" -) - -func checkErr(err error) { - if err != nil { - panic(err) - } -} - -func main() { - var err error - - osList := []string{"windows", "darwin", "linux"} - archList := []string{"386", "amd64"} - - for _, buildOS := range osList { - for _, buildArch := range archList { - // Set env variables - err = os.Setenv("GOOS", buildOS) - checkErr(err) - err = os.Setenv("GOARCH", buildArch) - checkErr(err) - - args := []string{"build", "-o", "dist/shadowfox_" + buildOS + "_" + buildArch} - - if buildOS == "windows" { - args[2] += ".exe" - - // Generate .syso files - rsrc := exec.Command( - "rsrc", - "-manifest", "manifest.xml", - "-arch", buildArch, - "-o", "shadowfox.syso", - ) - _, err := rsrc.Output() - checkErr(err) - } - - build := exec.Command("go", args...) - _, err := build.Output() - checkErr(err) - } - } -} diff --git a/main.go b/main.go index abb7beb..4d12a61 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -const version = "1.5.6" +var version = "dev" func main() { err := createUI()