Go releaser
This commit is contained in:
parent
294bc37195
commit
5270720c46
6 changed files with 46 additions and 8 deletions
38
.goreleaser.yml
Normal file
38
.goreleaser.yml
Normal 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
|
|
@ -26,9 +26,9 @@ import (
|
|||
|
||||
"github.com/neonxp/rutina/v2"
|
||||
|
||||
"backend/pkg/api"
|
||||
"backend/pkg/config"
|
||||
"backend/pkg/db"
|
||||
"github.com/neonxp/wsbroadcast/pkg/api"
|
||||
"github.com/neonxp/wsbroadcast/pkg/config"
|
||||
"github.com/neonxp/wsbroadcast/pkg/db"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -33,8 +33,8 @@ import (
|
|||
|
||||
"github.com/labstack/echo/v4"
|
||||
|
||||
"backend/pkg/config"
|
||||
"backend/pkg/db"
|
||||
"github.com/neonxp/wsbroadcast/pkg/config"
|
||||
"github.com/neonxp/wsbroadcast/pkg/db"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
"backend/pkg/model"
|
||||
"github.com/neonxp/wsbroadcast/pkg/model"
|
||||
)
|
||||
|
||||
func (s *Server) createChannel(c echo.Context) error {
|
||||
|
|
|
@ -21,7 +21,7 @@ THE SOFTWARE.
|
|||
*/
|
||||
package api
|
||||
|
||||
import "backend/pkg/model"
|
||||
import "github.com/neonxp/wsbroadcast/pkg/model"
|
||||
|
||||
type connection struct {
|
||||
ID uint64 `json:"id"`
|
||||
|
|
|
@ -28,7 +28,7 @@ import (
|
|||
"github.com/labstack/echo/v4"
|
||||
"golang.org/x/net/websocket"
|
||||
|
||||
"backend/pkg/model"
|
||||
"github.com/neonxp/wsbroadcast/pkg/model"
|
||||
)
|
||||
|
||||
func (s *Server) websocketHandler(c echo.Context) error {
|
||||
|
|
Loading…
Reference in a new issue