From 28adacf53ee9754bebb1c97024dbd1645c13d15c Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 13 Oct 2019 15:12:54 +0500 Subject: [PATCH 1/2] Moved to go.dev.pztrn.name and updated README with badges. --- .drone.yml | 23 +++++++++++++++++++++-- README.md | 2 ++ cmd/giredorectl/main.go | 4 ++-- cmd/giredored/main.go | 8 ++++---- domains/client/v1/config.go | 4 ++-- domains/client/v1/exported.go | 4 ++-- domains/client/v1/packages.go | 4 ++-- domains/server/v1/configapi.go | 4 ++-- domains/server/v1/exported.go | 4 ++-- domains/server/v1/goimports.go | 4 ++-- domains/server/v1/packagesapi.go | 4 ++-- go.mod | 2 +- internal/configuration/exported.go | 2 +- internal/configuration/fileconfig.go | 2 +- internal/httpserver/checkallowedips.go | 4 ++-- internal/httpserver/exported.go | 4 ++-- internal/requester/exported.go | 2 +- 17 files changed, 51 insertions(+), 30 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8d84dba..ddebe80 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,14 +13,33 @@ steps: from_secret: discord_webhook_secret message: 'Starting building **{{repo.name}}#{{build.number}}@{{build.commit}}** @ {{datetime build.started "02-Jan-2006 15:04:05 MST" "Asia/Yekaterinburg"}} (See {{build.link}} for logs).' + - name: lint + image: golangci/golangci-lint:latest + environment: + GOFLAGS: -mod=vendor + CGO_ENABLED: 0 + commands: + - golangci-lint run + + - name: test + image: golang:1.13.1-alpine + environment: + GOFLAGS: -mod=vendor + CGO_ENABLED: 0 + commands: + - go test ./... + - name: docker image: plugins/docker + when: + branch: + master settings: username: from_secret: dockerhub_user password: from_secret: dockerhub_password - repo: pztrn/giredore + repo: pztrn/fastpastebin auto_tag: true - name: notify-end @@ -36,7 +55,7 @@ steps: from_secret: discord_webhook_secret message: " {{#success build.status}} - **{{repo.name}}#{{build.number}}@{{build.commit}}** deployed. + **{{repo.name}}#{{build.number}}@{{build.commit}}** built and pushed to hub.docker.com. {{ else }} **{{repo.name}}#{{build.number}}@{{build.commit}}** failed. See {{build.link}}. {{/success}}" \ No newline at end of file diff --git a/README.md b/README.md index dcfaccc..db04397 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://ci.dev.pztrn.name/api/badges/pztrn/giredore/status.svg)](https://ci.dev.pztrn.name/pztrn/giredore) [![Discord](https://img.shields.io/discord/632359730089689128)](https://discord.gg/qHN6KsD) ![Keybase XLM](https://img.shields.io/keybase/xlm/pztrn) + # Giredore **Giredore** is an utility that does go-import redirects right. Main idea of this project is to provide easy-to-use yet powerful tool for Go developers to serve they packages right and help them with getting nice and very static URLs for their packages. diff --git a/cmd/giredorectl/main.go b/cmd/giredorectl/main.go index a1a60d4..029faf4 100644 --- a/cmd/giredorectl/main.go +++ b/cmd/giredorectl/main.go @@ -5,8 +5,8 @@ import ( "os" // local - clientv1 "sources.dev.pztrn.name/pztrn/giredore/domains/client/v1" - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + clientv1 "go.dev.pztrn.name/giredore/domains/client/v1" + "go.dev.pztrn.name/giredore/internal/logger" // other "github.com/teris-io/cli" diff --git a/cmd/giredored/main.go b/cmd/giredored/main.go index ab75601..0d90e02 100644 --- a/cmd/giredored/main.go +++ b/cmd/giredored/main.go @@ -7,10 +7,10 @@ import ( "syscall" // local - serverv1 "sources.dev.pztrn.name/pztrn/giredore/domains/server/v1" - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/httpserver" - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + serverv1 "go.dev.pztrn.name/giredore/domains/server/v1" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/httpserver" + "go.dev.pztrn.name/giredore/internal/logger" ) func main() { diff --git a/domains/client/v1/config.go b/domains/client/v1/config.go index 71721ea..be0efed 100644 --- a/domains/client/v1/config.go +++ b/domains/client/v1/config.go @@ -5,8 +5,8 @@ import ( "strings" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/requester" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/requester" + "go.dev.pztrn.name/giredore/internal/structs" ) func GetConfiguration(options map[string]string) { diff --git a/domains/client/v1/exported.go b/domains/client/v1/exported.go index e2d5cea..5ef9b2f 100644 --- a/domains/client/v1/exported.go +++ b/domains/client/v1/exported.go @@ -2,8 +2,8 @@ package clientv1 import ( // local - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" - "sources.dev.pztrn.name/pztrn/giredore/internal/requester" + "go.dev.pztrn.name/giredore/internal/logger" + "go.dev.pztrn.name/giredore/internal/requester" // other "github.com/rs/zerolog" diff --git a/domains/client/v1/packages.go b/domains/client/v1/packages.go index 263fcd4..772baab 100644 --- a/domains/client/v1/packages.go +++ b/domains/client/v1/packages.go @@ -5,8 +5,8 @@ import ( "strings" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/requester" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/requester" + "go.dev.pztrn.name/giredore/internal/structs" ) func DeletePackage(args []string, options map[string]string) { diff --git a/domains/server/v1/configapi.go b/domains/server/v1/configapi.go index ee2529a..5bb9dce 100644 --- a/domains/server/v1/configapi.go +++ b/domains/server/v1/configapi.go @@ -5,8 +5,8 @@ import ( "net/http" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/structs" // other "github.com/labstack/echo" diff --git a/domains/server/v1/exported.go b/domains/server/v1/exported.go index 38a2f64..991cb02 100644 --- a/domains/server/v1/exported.go +++ b/domains/server/v1/exported.go @@ -2,8 +2,8 @@ package serverv1 import ( // local - "sources.dev.pztrn.name/pztrn/giredore/internal/httpserver" - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + "go.dev.pztrn.name/giredore/internal/httpserver" + "go.dev.pztrn.name/giredore/internal/logger" // other "github.com/rs/zerolog" diff --git a/domains/server/v1/goimports.go b/domains/server/v1/goimports.go index 6f2faaf..6a9c50f 100644 --- a/domains/server/v1/goimports.go +++ b/domains/server/v1/goimports.go @@ -6,8 +6,8 @@ import ( "strings" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/structs" // other "github.com/labstack/echo" diff --git a/domains/server/v1/packagesapi.go b/domains/server/v1/packagesapi.go index 499ea91..dd9c3b9 100644 --- a/domains/server/v1/packagesapi.go +++ b/domains/server/v1/packagesapi.go @@ -6,8 +6,8 @@ import ( "strings" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/structs" // other "github.com/labstack/echo" diff --git a/go.mod b/go.mod index cd38230..f0f786b 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module sources.dev.pztrn.name/pztrn/giredore +module go.dev.pztrn.name/giredore go 1.13 diff --git a/internal/configuration/exported.go b/internal/configuration/exported.go index 1158508..3bd9e53 100644 --- a/internal/configuration/exported.go +++ b/internal/configuration/exported.go @@ -2,7 +2,7 @@ package configuration import ( // local - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + "go.dev.pztrn.name/giredore/internal/logger" // other "github.com/rs/zerolog" diff --git a/internal/configuration/fileconfig.go b/internal/configuration/fileconfig.go index 8634620..3c2e0ca 100644 --- a/internal/configuration/fileconfig.go +++ b/internal/configuration/fileconfig.go @@ -10,7 +10,7 @@ import ( "sync" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/structs" ) // This structure represents configuration that will be parsed via file. diff --git a/internal/httpserver/checkallowedips.go b/internal/httpserver/checkallowedips.go index 5df83a8..169be3b 100644 --- a/internal/httpserver/checkallowedips.go +++ b/internal/httpserver/checkallowedips.go @@ -7,8 +7,8 @@ import ( "strings" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/structs" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/structs" // other "github.com/labstack/echo" diff --git a/internal/httpserver/exported.go b/internal/httpserver/exported.go index 48f5a6f..72067a3 100644 --- a/internal/httpserver/exported.go +++ b/internal/httpserver/exported.go @@ -9,8 +9,8 @@ import ( "time" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/configuration" - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + "go.dev.pztrn.name/giredore/internal/configuration" + "go.dev.pztrn.name/giredore/internal/logger" // other "github.com/labstack/echo" diff --git a/internal/requester/exported.go b/internal/requester/exported.go index 00bf6ff..7bde2a1 100644 --- a/internal/requester/exported.go +++ b/internal/requester/exported.go @@ -8,7 +8,7 @@ import ( "net/http" // local - "sources.dev.pztrn.name/pztrn/giredore/internal/logger" + "go.dev.pztrn.name/giredore/internal/logger" // other "github.com/rs/zerolog" From ce3c10c8a5d2cd081635186cad1ff44711305896 Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sun, 13 Oct 2019 15:14:19 +0500 Subject: [PATCH 2/2] Copypast is good source of typos. Fixed docker hub repo where we will push images. --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index ddebe80..b3c1d40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -39,7 +39,7 @@ steps: from_secret: dockerhub_user password: from_secret: dockerhub_password - repo: pztrn/fastpastebin + repo: pztrn/giredore auto_tag: true - name: notify-end