-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
128 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*.so | ||
*.dylib | ||
bin/ | ||
dist/ | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
before: | ||
hooks: | ||
- go mod download | ||
|
||
project_name: mysql-tarantool-replicator | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
main: ./cmd/replicator/main.go | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildDate={{.Date}} | ||
goarch: | ||
- amd64 | ||
|
||
archives: | ||
- files: | ||
- LICENSE | ||
- README.md | ||
- config/* | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
# Algorithm to be used. | ||
# Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384. | ||
# Default is sha256. | ||
algorithm: sha256 | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}" | ||
|
||
changelog: | ||
skip: true | ||
|
||
nfpms: | ||
- id: default | ||
package_name: mysql-tarantool-replicator | ||
|
||
maintainer: Pavel Parshin <parshin.pn@gmail.com> | ||
homepage: https://github.com/pparshin/go-mysql-tarantool | ||
description: MySQL - Tarantool replicator | ||
license: MIT | ||
|
||
formats: | ||
- deb | ||
- rpm | ||
|
||
dependencies: ~ | ||
recommends: | ||
- mysql-client | ||
suggests: ~ | ||
conflicts: ~ | ||
|
||
bindir: /usr/local/bin | ||
|
||
epoch: 1 | ||
release: 1 | ||
|
||
scripts: | ||
postinstall: "scripts/postinstall.sh" | ||
preremove: "scripts/preremove.sh" | ||
|
||
files: | ||
"scripts/etc/systemd/**": "/etc/systemd/system" | ||
|
||
config_files: | ||
"config/replicator.conf.yml": "/etc/mysql-tarantool/conf.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=mysql-tarantool-replicator: MySQL binlog replication to Tarantool. | ||
Documentation=https://github.com/pparshin/go-mysql-tarantool | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
Type=simple | ||
WorkingDirectory=/usr/local/bin | ||
ExecStart=/usr/local/bin/mysql-tarantool-replicator -config /etc/mysql-tarantool/conf.yml | ||
TimeoutSec=30 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
systemctl --system daemon-reload >/dev/null || true | ||
systemctl enable mysql-tarantool-replicator.service >/dev/null || true | ||
|
||
deb_systemctl=$(command -v deb-systemd-invoke || echo systemctl) | ||
${deb_systemctl} restart mysql-tarantool-replicator.service >/dev/null || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
deb_systemctl=$(command -v deb-systemd-invoke || echo systemctl) | ||
${deb_systemctl} stop mysql-tarantool-replicator.service >/dev/null || true | ||
|
||
systemctl disable mysql-tarantool-replicator.service >/dev/null || true | ||
systemctl --system daemon-reload >/dev/null || true |