145 lines
3.5 KiB
YAML
145 lines
3.5 KiB
YAML
version: 2
|
|
|
|
project_name: scron
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- go generate ./...
|
|
|
|
builds:
|
|
- env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- "386"
|
|
- amd64
|
|
- arm
|
|
- arm64
|
|
goarm:
|
|
- "6"
|
|
- "7"
|
|
main: ./
|
|
binary: scron
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
|
|
|
|
|
|
nfpms:
|
|
- id: scron
|
|
package_name: scron
|
|
vendor: SCRON Project
|
|
homepage: https://git.keks.cloud/kekskurse/scron
|
|
maintainer: SCRON Maintainers <maintainer@example.com>
|
|
description: |-
|
|
A lightweight, efficient cron-like scheduler written in Go.
|
|
SCRON executes shell commands at specified intervals with precise timing
|
|
and comprehensive logging support.
|
|
license: MIT
|
|
formats:
|
|
- deb
|
|
- rpm
|
|
- apk
|
|
bindir: /usr/bin
|
|
section: utils
|
|
priority: optional
|
|
file_name_template: "{{ .ConventionalFileName }}"
|
|
contents:
|
|
- src: config.yml.example
|
|
dst: /etc/scron/config.yml
|
|
type: config|noreplace
|
|
file_info:
|
|
mode: 0644
|
|
- src: scripts/scron.service
|
|
dst: /etc/systemd/system/scron.service
|
|
file_info:
|
|
mode: 0644
|
|
- dst: /etc/scron
|
|
type: dir
|
|
file_info:
|
|
mode: 0755
|
|
scripts:
|
|
postinstall: scripts/postinstall.sh
|
|
preremove: scripts/preremove.sh
|
|
postremove: scripts/postremove.sh
|
|
dependencies:
|
|
- bash
|
|
- systemd
|
|
recommends:
|
|
- logrotate
|
|
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
|
|
|
|
|
|
changelog:
|
|
sort: asc
|
|
use: github
|
|
filters:
|
|
exclude:
|
|
- "^docs:"
|
|
- "^test:"
|
|
- "^ci:"
|
|
- "^chore:"
|
|
- "^style:"
|
|
groups:
|
|
- title: Features
|
|
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
|
order: 0
|
|
- title: 'Bug fixes'
|
|
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
|
order: 1
|
|
- title: 'Performance improvements'
|
|
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
|
|
order: 2
|
|
- title: Others
|
|
order: 999
|
|
|
|
gitea_urls:
|
|
api: https://git.keks.cloud/api/v1/
|
|
download: https://git.keks.cloud
|
|
skip_tls_verify: false
|
|
|
|
release:
|
|
gitea:
|
|
owner: kekskurse
|
|
name: scron
|
|
draft: false
|
|
prerelease: auto
|
|
mode: replace
|
|
header: |
|
|
## SCRON {{ .Tag }}
|
|
|
|
A lightweight, efficient cron-like scheduler written in Go.
|
|
footer: |
|
|
## Installation
|
|
|
|
### Binary Installation
|
|
Download the appropriate binary for your system from the assets above.
|
|
|
|
### Debian/Ubuntu (.deb package)
|
|
```bash
|
|
wget https://git.keks.cloud/kekskurse/scron/releases/download/{{ .Tag }}/scron_{{ .Version }}_linux_amd64.deb
|
|
sudo dpkg -i scron_{{ .Version }}_linux_amd64.deb
|
|
```
|
|
|
|
### RPM-based systems (.rpm package)
|
|
```bash
|
|
wget https://git.keks.cloud/kekskurse/scron/releases/download/{{ .Tag }}/scron_{{ .Version }}_linux_amd64.rpm
|
|
sudo rpm -i scron_{{ .Version }}_linux_amd64.rpm
|
|
```
|
|
|
|
### Alpine Linux (.apk package)
|
|
```bash
|
|
wget https://git.keks.cloud/kekskurse/scron/releases/download/{{ .Tag }}/scron_{{ .Version }}_linux_amd64.apk
|
|
sudo apk add --allow-untrusted scron_{{ .Version }}_linux_amd64.apk
|
|
```
|
|
|
|
## Quick Start
|
|
|
|
1. Edit configuration: `/etc/scron/config.yml` (for package installs) or `config.yml` (for binary)
|
|
2. Start the service: `sudo systemctl start scron` (package) or `./scron` (binary)
|
|
3. View logs: `sudo journalctl -u scron -f` (package) or check stdout (binary)
|
|
name_template: "{{.ProjectName}}-v{{.Version}}"
|