Skip to content

Commit

Permalink
[#821] Support Snapcraft distribution (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
yohamta authored Feb 11, 2025
1 parent 83bcb60 commit 6cd013e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
run: |
cp ui/dist/* ./internal/frontend/assets/
- name: Install Snapcraft
run: sudo snap install snapcraft --classic

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
58 changes: 45 additions & 13 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
# goreleaser.yaml
version: 2
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy

builds:
- dir: ./cmd
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- freebsd
- openbsd
- netbsd
# - windows
goarch:
- amd64
- arm
- arm64
- "amd64"
- "386"
- "arm"
- "arm64"
- "ppc64le"
- "s390x"
goarm:
- "6"
- "7"

checksum:
name_template: "checksums.txt"

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

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

brews:
# DEPRECATED: prefer using dagu-org/dagu for brew formula
- repository:
owner: yohamta
name: homebrew-tap
owner: dagu-org
name: homebrew-brew
directory: Formula
homepage: "https://github.com/dagu-org/dagu"
description: "A No-code workflow engine that runs DAGs defined in a simple YAML format"
description: "Dagu is a compact, portable, and language-agnostic workflow engine."
license: "GNU General Public License v3.0"
custom_block: |
service do
Expand All @@ -45,12 +56,14 @@ brews:
log_path var/"log/dagu.log"
working_dir var
end
# Deprecated brew tap:
- repository:
owner: dagu-org
name: homebrew-brew
owner: yohamta
name: homebrew-tap
directory: Formula
homepage: "https://github.com/dagu-org/dagu"
description: "A No-code workflow engine that runs DAGs defined in a simple YAML format"
description: "Dagu is a compact, portable, and language-agnostic workflow engine."
license: "GNU General Public License v3.0"
custom_block: |
service do
Expand All @@ -60,3 +73,22 @@ brews:
log_path var/"log/dagu.log"
working_dir var
end
snapcrafts:
- name: dagu
title: Dagu
summary: "A compact, portable, and language-agnostic workflow engine."
description: "Dagu is a compact, portable, and language-agnostic workflow engine."
confinement: strict
grade: stable
base: core22
license: "GPL-3.0"
apps:
dagu:
command: dagu start-all
daemon: simple
restart_condition: "always"
plugs:
- network
- home
- personal-files
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ LDFLAGS=-X 'main.version=$(BUILD_VERSION)-$(DATE)'
APP_NAME=dagu

# Docker image build configuration
DOCKER_CMD := docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 --builder container --build-arg VERSION=$(VERSION) --push --no-cache
DOCKER_CMD := docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 --builder container --build-arg LDFLAGS=$(LDFLAGS) --push --no-cache

# Arguments for the tests
GOTESTSUM_ARGS=--format=standard-quiet
Expand Down
2 changes: 1 addition & 1 deletion internal/digraph/executor/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type mailConfig struct {
To string `mapstructure:"to"`
Subject string `mapstructure:"subject"`
Message string `mapstructure:"message"`
Attachments []string `json:"attachments,omitempty"`
Attachments []string `mapstructure:"attachments"`
}

func newMail(ctx context.Context, step digraph.Step) (Executor, error) {
Expand Down

0 comments on commit 6cd013e

Please sign in to comment.