yats.git

commit 5646a8896664ecc31a858a514925b94c50848a76

Author: Paolo Lulli <paolo@lulli.net>

Binary release

 .goreleaser.yaml | 61 +++++++++++++++++++++++++++++++++++++++++++
 release.sh | 7 ++++
 server/.goreleaser.yaml | 54 ++++++++++++++++++++++++++++++++++++++


diff --git a/.goreleaser.yaml b/.goreleaser.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..4f964141fdcdb5207080fdc1713e214755d1ae51
--- /dev/null
+++ b/.goreleaser.yaml
@@ -0,0 +1,61 @@
+project_name: yats
+version: 2
+
+
+
+before:
+  hooks:
+    # You may remove this if you don't use go modules.
+    #- go mod tidy
+    # you may remove this if you don't need go generate
+    #- go generate ./...
+
+builds:
+  main: ./server/main.go
+  env:
+      - CGO_ENABLED=0
+  goos:
+     - linux
+     - windows
+     - darwin
+     - freebsd
+#Configuration for building packages for rpm and deb package managers
+nfpms:
+  - package_name: yats
+    homepage: https://kevwe.com
+    maintainer: Paolo Lulli <paolo@lulli.net>
+    description: |-
+            My own package description
+    formats:
+      - rpm
+      - deb
+
+archives:
+  - format: tar.gz
+    # this name template makes the OS and Arch compatible with the results of `uname`.
+    name_template: >-
+      {{ .ProjectName }}_
+      {{- title .Os }}_
+      {{- if eq .Arch "amd64" }}x86_64
+      {{- else if eq .Arch "386" }}i386
+      {{- else }}{{ .Arch }}{{ end }}
+      {{- if .Arm }}v{{ .Arm }}{{ end }}
+    # use zip for windows archives
+    format_overrides:
+      - goos: windows
+        format: zip
+          #      - goos: linux
+          #format: deb
+
+changelog:
+  sort: asc
+  filters:
+    exclude:
+      - "^docs:"
+      - "^test:"
+
+uploads:
+  - name: production
+    client_x509_cert: path/to/client.cert.pem
+    client_x509_key: path/to/client.key.pem
+    target: "http://some.server/some/path/example-repo-local/{{ .ProjectName }}/{{ .Version }}/{{ .Os }}/{{ .Arch }}{{ if .Arm }}{{ .Arm }}{{ end }}"




diff --git a/release.sh b/release.sh
new file mode 100755
index 0000000000000000000000000000000000000000..81df05016279d3a9485584928a631c7dd01fb773
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,7 @@
+#! /bin/bash -x
+
+#export GO111MODULE=on
+#goreleaser init
+cd server
+goreleaser release --snapshot --clean
+




diff --git a/server/.goreleaser.yaml b/server/.goreleaser.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..260042f009333556eb9ad3e4110e994ac810ede4
--- /dev/null
+++ b/server/.goreleaser.yaml
@@ -0,0 +1,54 @@
+project_name: yats
+version: 2
+
+before:
+  hooks:
+    # You may remove this if you don't use go modules.
+    - go mod tidy
+    # you may remove this if you don't need go generate
+    #- go generate ./...
+
+builds:
+  - env:
+      - CGO_ENABLED=0
+    goos:
+      - linux
+      - windows
+      - darwin
+      - freebsd
+        #    main: ./server/main.go
+
+#Configuration for building packages for rpm and deb package managers
+nfpms:
+  - package_name: yats
+    homepage: https://kevwe.com
+    maintainer: Paolo Lulli <paolo@lulli.net>
+    description: |-
+            Yats Server - Yet Another Time Serie
+    formats:
+      - rpm
+      - deb
+
+archives:
+  - format: tar.gz
+    # this name template makes the OS and Arch compatible with the results of `uname`.
+    name_template: >-
+      {{ .ProjectName }}_
+      {{- title .Os }}_
+      {{- if eq .Arch "amd64" }}x86_64
+      {{- else if eq .Arch "386" }}i386
+      {{- else }}{{ .Arch }}{{ end }}
+      {{- if .Arm }}v{{ .Arm }}{{ end }}
+    # use zip for windows archives
+    format_overrides:
+      - goos: windows
+        format: zip
+          #      - goos: linux
+          #format: deb
+
+changelog:
+  sort: asc
+  filters:
+    exclude:
+      - "^docs:"
+      - "^test:"
\ No newline at end of file