Go releaser

This commit is contained in:
Alexander Kiryukhin 2020-03-28 18:37:20 +03:00
parent 294bc37195
commit 5270720c46
6 changed files with 46 additions and 8 deletions

38
.goreleaser.yml Normal file
View file

@ -0,0 +1,38 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
builds:
-
id: "api"
main: ./cmd/api/main.go
binary: api
# List of combinations of GOOS + GOARCH + GOARM to ignore.
# Default is empty.
ignore:
- goos: darwin
goarch: 386
- goos: linux
goarch: arm
goarm: 7
- goarm: mips64
gomips: hardfloat

View file

@ -26,9 +26,9 @@ import (
"github.com/neonxp/rutina/v2" "github.com/neonxp/rutina/v2"
"backend/pkg/api" "github.com/neonxp/wsbroadcast/pkg/api"
"backend/pkg/config" "github.com/neonxp/wsbroadcast/pkg/config"
"backend/pkg/db" "github.com/neonxp/wsbroadcast/pkg/db"
) )
func main() { func main() {

View file

@ -33,8 +33,8 @@ import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"backend/pkg/config" "github.com/neonxp/wsbroadcast/pkg/config"
"backend/pkg/db" "github.com/neonxp/wsbroadcast/pkg/db"
) )
type Server struct { type Server struct {

View file

@ -29,7 +29,7 @@ import (
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"
"backend/pkg/model" "github.com/neonxp/wsbroadcast/pkg/model"
) )
func (s *Server) createChannel(c echo.Context) error { func (s *Server) createChannel(c echo.Context) error {

View file

@ -21,7 +21,7 @@ THE SOFTWARE.
*/ */
package api package api
import "backend/pkg/model" import "github.com/neonxp/wsbroadcast/pkg/model"
type connection struct { type connection struct {
ID uint64 `json:"id"` ID uint64 `json:"id"`

View file

@ -28,7 +28,7 @@ import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
"backend/pkg/model" "github.com/neonxp/wsbroadcast/pkg/model"
) )
func (s *Server) websocketHandler(c echo.Context) error { func (s *Server) websocketHandler(c echo.Context) error {