Skip to content
edgesync Artifact [a8a9539c7e]
Login

Artifact [a8a9539c7e]

Artifact a8a9539c7e7fd900783a36110a1fe831299f0d4a633e255bf0a9cc9621871185:


# GoReleaser config for edgesync.
# https://goreleaser.com
#
# Cross-compiles edgesync and the leaf daemon for macOS and Linux on
# amd64/arm64, archives as tarballs, generates checksums, publishes a
# GitHub release. install.sh installs from it.

version: 2

before:
  hooks:
    - go mod tidy
    - sh -c "cd leaf && go mod tidy"

builds:
  - id: edgesync
    main: ./cmd/edgesync
    binary: edgesync
    env:
      - CGO_ENABLED=0
    flags:
      - -trimpath
      - -buildvcs=false
    ldflags:
      - -s -w
      - -X main.version={{.Version}}
      - -X main.commit={{.ShortCommit}}
      - -X main.date={{.CommitDate}}
    goos:
      - linux
      - darwin
    goarch:
      - amd64
      - arm64

  # leaf is its own Go module under ./leaf — `dir: leaf` switches goreleaser
  # into that module so its go.mod resolves cleanly without root replaces.
  - id: leaf
    main: ./cmd/leaf
    dir: leaf
    binary: leaf
    env:
      - CGO_ENABLED=0
    flags:
      - -trimpath
      - -buildvcs=false
    ldflags:
      - -s -w
      - -X main.version={{.Version}}
    goos:
      - linux
      - darwin
    goarch:
      - amd64
      - arm64

archives:
  - id: edgesync
    ids: [edgesync]
    formats: [tar.gz]
    name_template: >-
      {{ .ProjectName }}_
      {{- .Version }}_
      {{- .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else }}{{ .Arch }}{{ end }}
    files:
      - LICENSE*
      - README*

  - id: leaf
    ids: [leaf]
    formats: [tar.gz]
    name_template: >-
      leaf_
      {{- .Version }}_
      {{- .Os }}_
      {{- if eq .Arch "amd64" }}x86_64
      {{- else }}{{ .Arch }}{{ end }}
    files:
      - LICENSE*

checksum:
  name_template: 'checksums.txt'
  algorithm: sha256

snapshot:
  version_template: "{{ incpatch .Version }}-next"

changelog:
  sort: asc
  use: github
  groups:
    - title: 'Features'
      regexp: '^.*?feat(\(.+\))??!?:.+$'
      order: 0
    - title: 'Bug fixes'
      regexp: '^.*?fix(\(.+\))??!?:.+$'
      order: 1
    - title: 'Other'
      order: 999
  filters:
    exclude:
      - '^docs:'
      - '^chore:'
      - '^test:'
      - '^ci:'
      - 'merge conflict'
      - 'Merge PR'
      - 'Merge pull request'
      - 'Merge remote-tracking branch'
      - 'Merge branch'

release:
  github:
    owner: danmestas
    name: EdgeSync
  draft: false
  prerelease: auto
  name_template: "{{.ProjectName}} v{{.Version}}"
  footer: |
    **Full Changelog**: https://github.com/danmestas/EdgeSync/compare/{{ .PreviousTag }}...{{ .Tag }}

    ## Install

    ### Install script (macOS / Linux)
    ```bash
    curl -fsSL https://raw.githubusercontent.com/danmestas/EdgeSync/main/install.sh | EDGESYNC_VERSION={{ .Tag }} sh
    ```

    ### Go
    ```bash
    go install github.com/danmestas/EdgeSync/cmd/edgesync@{{ .Tag }}
    ```

    ### Direct download
    Pick a binary from the assets above for your OS/arch.