diff --git a/.goreleaser.yml b/.goreleaser.yml index d4c588b..864d60f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,14 +1,17 @@ project_name: inbucket + release: github: owner: jhillyerd name: inbucket name_template: '{{.Tag}}' + brew: commit_author: name: goreleaserbot email: goreleaser@carlosbecker.com install: bin.install "" + builds: - binary: inbucket goos: @@ -22,7 +25,7 @@ builds: - "6" main: ./cmd/inbucket ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} - - binary: client + - binary: inbucket-client goos: - darwin - freebsd @@ -34,6 +37,7 @@ builds: - "6" main: ./cmd/client ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} + archive: format: tar.gz wrap_in_directory: true @@ -48,12 +52,28 @@ archive: - CHANGELOG* - etc/**/* - ui/**/* -fpm: - bindir: /usr/local/bin + +nfpm: + vendor: inbucket.org + homepage: https://www.inbucket.org/ + maintainer: github@hillyerd.com + description: All-in-one disposable webmail service. + license: MIT + formats: + - deb + files: + "ui/**/*": "/usr/local/share/inbucket/ui" + config_files: + "etc/linux/inbucket.service": "/lib/systemd/system/inbucket.service" + "ui/greeting.html": "/etc/inbucket/greeting.html" + snapshot: name_template: SNAPSHOT-{{ .Commit }} + checksum: name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt' + dist: dist + sign: artifacts: none diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e933c5..fd77963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Storage type is now displayed on Status page. - Store size is now calculated during retention scan and displayed on the Status page. +- Debian `.deb` package generation to release process. ### Changed - Massive refactor of back-end code. Inbucket should now be both easier and diff --git a/etc/linux/inbucket.service b/etc/linux/inbucket.service new file mode 100644 index 0000000..00ed9dc --- /dev/null +++ b/etc/linux/inbucket.service @@ -0,0 +1,33 @@ +[Unit] +Description=Inbucket Disposable Email Service +After=network.target + +[Service] +Type=simple +User=daemon +Group=daemon +PermissionsStartOnly=true + +Environment=INBUCKET_LOGLEVEL=WARN +Environment=INBUCKET_SMTP_ADDR=0.0.0.0:2500 +Environment=INBUCKET_POP3_ADDR=0.0.0.0:1100 +Environment=INBUCKET_WEB_ADDR=0.0.0.0:9000 +Environment=INBUCKET_WEB_UIDIR=/usr/local/share/inbucket/ui +Environment=INBUCKET_WEB_GREETINGFILE=/etc/inbucket/greeting.html +Environment=INBUCKET_STORAGE_TYPE=file +Environment=INBUCKET_STORAGE_PARAMS=path:/var/local/inbucket + +# Uncomment line below to use low numbered ports +#ExecStartPre=/sbin/setcap 'cap_net_bind_service=+ep' /usr/local/bin/inbucket + +ExecStartPre=/bin/mkdir -p /var/local/inbucket +ExecStartPre=/bin/chown daemon:daemon /var/local/inbucket + +ExecStart=/usr/local/bin/inbucket + +# Give SMTP connections time to drain +TimeoutStopSec=20 +KillMode=mixed + +[Install] +WantedBy=multi-user.target diff --git a/etc/ubuntu/README b/etc/ubuntu/README deleted file mode 100644 index f2559bd..0000000 --- a/etc/ubuntu/README +++ /dev/null @@ -1,3 +0,0 @@ -Please see the Ubuntu installation guide on our website: - -http://www.inbucket.org/installation/ubuntu.html diff --git a/etc/ubuntu/inbucket-upstart.conf b/etc/ubuntu/inbucket-upstart.conf deleted file mode 100644 index 810b6a9..0000000 --- a/etc/ubuntu/inbucket-upstart.conf +++ /dev/null @@ -1,29 +0,0 @@ -# inbucket - disposable email service -# -# Inbucket is an SMTP server with a web interface for testing application -# functionality - -description "inbucket - disposable email service" -author "http://jhillyerd.github.com/inbucket" - -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] - -env program=/opt/inbucket/inbucket -env config=/etc/opt/inbucket.conf -env logfile=/var/log/inbucket.log -env runas=inbucket - -# Give SMTP connections time to drain -kill timeout 20 - -pre-start script - [ -x $program ] - [ -r $config ] - touch $logfile - chown $runas: $logfile - # Allow bind to ports under 1024 - setcap 'cap_net_bind_service=+ep' $program -end script - -exec start-stop-daemon --start --chuid $runas --exec $program -- -logfile $logfile $config diff --git a/etc/ubuntu/inbucket.logrotate b/etc/ubuntu/inbucket.logrotate deleted file mode 100644 index 04ec439..0000000 --- a/etc/ubuntu/inbucket.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/inbucket.log { - missingok - notifempty - create 0644 inbucket inbucket - postrotate - [ -x /bin/systemctl ] && /bin/systemctl reload inbucket >/dev/null 2>&1 || true - endscript -} diff --git a/etc/ubuntu/inbucket.service b/etc/ubuntu/inbucket.service deleted file mode 100644 index 5480a45..0000000 --- a/etc/ubuntu/inbucket.service +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=Inbucket Disposable Email Service -After=network.target - -[Service] -Type=simple -User=inbucket -Group=inbucket - -ExecStart=/opt/inbucket/inbucket -logfile /var/log/inbucket.log /etc/opt/inbucket.conf - -# Re-open log file after rotation -ExecReload=/bin/kill -HUP $MAINPID - -# Give SMTP connections time to drain -TimeoutStopSec=20 -KillMode=mixed - -[Install] -WantedBy=multi-user.target