Compare commits

...

4 Commits

Author SHA1 Message Date
79665ddbf9 Fix goreleaser gitea config
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-01-13 15:23:45 +01:00
7435995981 Fix goreleaser main
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-01-13 15:20:33 +01:00
708147abc3 Add pipeline
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-01-13 15:15:16 +01:00
e62e5a878f Rename module 2022-01-13 15:09:42 +01:00
10 changed files with 94 additions and 10 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
dogtamer.toml
dogtamer.toml
gitea_token
dist/

36
.goreleaser.yaml Normal file
View File

@ -0,0 +1,36 @@
# 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
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
main: ./cmd/dogtamer.go
archives:
- format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
gitea_urls:
api: https://git.t-juice.club/api/v1/
download: https://git.t-juice.club
env_files:
gitea_token: gitea_token

46
.woodpecker.yml Normal file
View File

@ -0,0 +1,46 @@
pipeline:
test_short:
image: golang:latest
commands:
- go build cmd/dogtamer.go
- go test -v ./...
when:
event: [pull_request, push]
image-latest:
image: plugins/docker
settings:
repo: registry.t-juice.club/peckertest
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- latest
- "${CI_COMMIT_SHA:0:8}"
when:
branch: master
event: push
image-tagged:
image: plugins/docker
settings:
repo: registry.t-juice.club/peckertest
registry: registry.t-juice.club
username: woodpecker
password:
from_secret: registry_password
tags:
- "${CI_COMMIT_TAG}"
when:
event: [tag]
goreleaser-tagged:
image: goreleaser/goreleaser
commands:
- git fetch --tags
- echo "$GITEA_TOKEN" > gitea_token
- goreleaser release
when:
event: [tag]
secrets: [gitea_token]

View File

@ -1,4 +1,4 @@
FROM golang:latest as builder
FROM golang:alpine as builder
WORKDIR /app
COPY go.mod /app/go.mod
COPY go.sum /app/go.sum

View File

@ -9,10 +9,10 @@ import (
"runtime/pprof"
"strings"
"git.t-juice.club/torjus/dogtamer"
"git.t-juice.club/torjus/dogtamer/config"
"git.t-juice.club/torjus/dogtamer/server"
"github.com/urfave/cli/v2"
"github.uio.no/torjus/dogtamer"
"github.uio.no/torjus/dogtamer/config"
"github.uio.no/torjus/dogtamer/server"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)

View File

@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.uio.no/torjus/dogtamer/config"
"git.t-juice.club/torjus/dogtamer/config"
)
func TestConfig(t *testing.T) {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.uio.no/torjus/dogtamer
module git.t-juice.club/torjus/dogtamer
go 1.17

View File

@ -4,7 +4,7 @@ import (
"bytes"
"testing"
"github.uio.no/torjus/dogtamer/m3u"
"git.t-juice.club/torjus/dogtamer/m3u"
)
func TestPlaylist(t *testing.T) {

View File

@ -7,9 +7,9 @@ import (
"net/http"
"time"
"git.t-juice.club/torjus/dogtamer/m3u"
"github.com/go-chi/chi/v5"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.uio.no/torjus/dogtamer/m3u"
"go.uber.org/zap"
)

View File

@ -2,7 +2,7 @@ package dogtamer
import "fmt"
const Version string = "v0.1.10"
const Version string = "v0.1.13"
var Build string