add more package support

This commit is contained in:
Zack Scholl 2018-10-13 10:19:43 -06:00
parent 74f0ac5950
commit 09a90a322a
2 changed files with 85 additions and 34 deletions

View File

@ -1,34 +1,85 @@
# .goreleaser.yml project_name: croc
# Build customization build:
builds: main: main.go
- binary: croc binary: croc
goos: ldflags: -s -w -X main.Version="v{{.Version}}-{{.Date}}"
- windows env:
- darwin - CGO_ENABLED=0
- linux goos:
goarch: - darwin
- amd64 - linux
- arm - windows
- 386 - freebsd
goarm: - netbsd
- 6 - openbsd
ignore: - dragonfly
- goos: darwin goarch:
goarch: arm - amd64
- goos: windows - 386
goarch: arm - arm
- goos: darwin - arm64
goarch: 386 goarm:
env: - 7
- CGO_ENABLED=0 snapcraft:
archive: name: croc
summary: A simple, secure, and fast way to transfer data.
description: This allows you to transfer data between two computers as though they were on LAN.
grade: stable
confinement: strict
replacements: replacements:
amd64: 64bit amd64: 64bit
386: 32bit 386: 32bit
darwin: OSX arm: ARM
linux_arm: raspberry_pi arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
nfpm:
formats:
- deb
vendor: "schollz.com"
homepage: "https://github.com/schollz/croc"
maintainer: "Zack Scholl <zack.scholl@gmail.com>"
description: "A simple, secure, and fast way to transfer data."
license: "MIT"
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
archive:
format: tar.gz
format_overrides: format_overrides:
- goos: windows - goos: windows
format: zip format: zip
- goos: darwin name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
format: zip replacements:
amd64: 64bit
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
release:
draft: true

View File

@ -17,7 +17,7 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
) )
var version string var Version string
var codePhrase string var codePhrase string
var cr *croc.Croc var cr *croc.Croc
@ -25,11 +25,11 @@ var cr *croc.Croc
func main() { func main() {
app := cli.NewApp() app := cli.NewApp()
app.Name = "croc" app.Name = "croc"
if version == "" { if Version == "" {
version = "dev" Version = "dev"
} }
app.Version = version app.Version = Version
app.Compiled = time.Now() app.Compiled = time.Now()
app.Usage = "easily and securely transfer stuff from one computer to another" app.Usage = "easily and securely transfer stuff from one computer to another"
app.UsageText = "croc allows any two computers to directly and securely transfer files" app.UsageText = "croc allows any two computers to directly and securely transfer files"