Skip to content

Commit

Permalink
fix: customized code to match repo
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszmajsak committed Sep 17, 2019
1 parent e4fb750 commit 77152d3
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
## Regular build running unit tests and linters
build:
working_directory: /go/src/github.com/bartoszmajsak/template-golang
working_directory: /go/src/github.com/bartoszmajsak/github-changelog-generator
docker:
- image: circleci/golang:1.12.9
steps:
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ linters-settings:
lll:
line-length: 180
goimports:
local-prefixes: github.com/bartoszmajsak/template-golang
local-prefixes: github.com/bartoszmajsak/github-changelog-generator
gocritic:
enabled-tags:
- performance
Expand Down Expand Up @@ -59,7 +59,7 @@ issues:
- dupl

service:
project-path: github.com/bartoszmajsak/template-golang
project-path: github.com/bartoszmajsak/github-changelog-generator
golangci-lint-version: 1.17.x # Locks the version to avoid newly introduces linters
prepare:
- make lint-prepare
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PROJECT_NAME:=template-golang
PROJECT_NAME:=github-changelog-generator
PACKAGE_NAME:=github.com/bartoszmajsak/$(PROJECT_NAME)

PROJECT_DIR:=$(shell pwd)
Expand Down
8 changes: 4 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"strings"
"time"

"github.com/bartoszmajsak/template-golang/pkg/cmd/version"
"github.com/bartoszmajsak/template-golang/pkg/config"
"github.com/bartoszmajsak/template-golang/pkg/format"
v "github.com/bartoszmajsak/template-golang/version"
"github.com/bartoszmajsak/github-changelog-generator/pkg/cmd/version"
"github.com/bartoszmajsak/github-changelog-generator/pkg/config"
"github.com/bartoszmajsak/github-changelog-generator/pkg/format"
v "github.com/bartoszmajsak/github-changelog-generator/version"

"github.com/spf13/cobra"
)
Expand Down
24 changes: 0 additions & 24 deletions init.sh

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/cmd/version/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"runtime"

"github.com/bartoszmajsak/template-golang/version"
"github.com/bartoszmajsak/github-changelog-generator/version"

"github.com/spf13/cobra"
)
Expand Down
32 changes: 16 additions & 16 deletions pkg/cmd/version/fixtures/latest_release_is_v.0.0.2.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/18367686",
"assets_url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/18367686/assets",
"upload_url": "https://uploads.github.com/repos/bartoszmajsak/template-golang/releases/18367686/assets{?name,label}",
"html_url": "https://github.com/bartoszmajsak/template-golang/releases/tag/v0.0.2",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/18367686",
"assets_url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/18367686/assets",
"upload_url": "https://uploads.github.com/repos/bartoszmajsak/github-changelog-generator/releases/18367686/assets{?name,label}",
"html_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/tag/v0.0.2",
"id": 18367686,
"node_id": "MDc6UmVsZWFzZTE4MzY3Njg2",
"tag_name": "v0.0.2",
Expand Down Expand Up @@ -34,7 +34,7 @@
"published_at": "2019-07-02T18:31:57Z",
"assets": [
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/assets/13516502",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/assets/13516502",
"id": 13516502,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEzNTE2NTAy",
"name": "checksums.txt",
Expand Down Expand Up @@ -65,10 +65,10 @@
"download_count": 0,
"created_at": "2019-07-02T18:31:57Z",
"updated_at": "2019-07-02T18:31:57Z",
"browser_download_url": "https://github.com/bartoszmajsak/template-golang/releases/download/v0.0.2/checksums.txt"
"browser_download_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/download/v0.0.2/checksums.txt"
},
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/assets/13516504",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/assets/13516504",
"id": 13516504,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEzNTE2NTA0",
"name": "ike_0.0.1_Darwin_i386.tar.gz",
Expand Down Expand Up @@ -99,10 +99,10 @@
"download_count": 0,
"created_at": "2019-07-02T18:31:57Z",
"updated_at": "2019-07-02T18:31:58Z",
"browser_download_url": "https://github.com/bartoszmajsak/template-golang/releases/download/v0.0.2/ike_0.0.1_Darwin_i386.tar.gz"
"browser_download_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/download/v0.0.2/ike_0.0.1_Darwin_i386.tar.gz"
},
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/assets/13516505",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/assets/13516505",
"id": 13516505,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEzNTE2NTA1",
"name": "ike_0.0.1_Darwin_x86_64.tar.gz",
Expand Down Expand Up @@ -133,10 +133,10 @@
"download_count": 0,
"created_at": "2019-07-02T18:31:57Z",
"updated_at": "2019-07-02T18:31:58Z",
"browser_download_url": "https://github.com/bartoszmajsak/template-golang/releases/download/v0.0.2/ike_0.0.1_Darwin_x86_64.tar.gz"
"browser_download_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/download/v0.0.2/ike_0.0.1_Darwin_x86_64.tar.gz"
},
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/assets/13516501",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/assets/13516501",
"id": 13516501,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEzNTE2NTAx",
"name": "ike_0.0.1_Linux_i386.tar.gz",
Expand Down Expand Up @@ -167,10 +167,10 @@
"download_count": 0,
"created_at": "2019-07-02T18:31:57Z",
"updated_at": "2019-07-02T18:31:58Z",
"browser_download_url": "https://github.com/bartoszmajsak/template-golang/releases/download/v0.0.2/ike_0.0.1_Linux_i386.tar.gz"
"browser_download_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/download/v0.0.2/ike_0.0.1_Linux_i386.tar.gz"
},
{
"url": "https://api.github.com/repos/bartoszmajsak/template-golang/releases/assets/13516503",
"url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/releases/assets/13516503",
"id": 13516503,
"node_id": "MDEyOlJlbGVhc2VBc3NldDEzNTE2NTAz",
"name": "ike_0.0.1_Linux_x86_64.tar.gz",
Expand Down Expand Up @@ -201,10 +201,10 @@
"download_count": 37,
"created_at": "2019-07-02T18:31:57Z",
"updated_at": "2019-07-02T18:31:58Z",
"browser_download_url": "https://github.com/bartoszmajsak/template-golang/releases/download/v0.0.2/ike_0.0.1_Linux_x86_64.tar.gz"
"browser_download_url": "https://github.com/bartoszmajsak/github-changelog-generator/releases/download/v0.0.2/ike_0.0.1_Linux_x86_64.tar.gz"
}
],
"tarball_url": "https://api.github.com/repos/bartoszmajsak/template-golang/tarball/v0.0.2",
"zipball_url": "https://api.github.com/repos/bartoszmajsak/template-golang/zipball/v0.0.2",
"tarball_url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/tarball/v0.0.2",
"zipball_url": "https://api.github.com/repos/bartoszmajsak/github-changelog-generator/zipball/v0.0.2",
"body": "# Highlights of v0.0.2 release\n\nInspired by @bobbytables talk from [OSCON 2018](https://youtu.be/yhvR02UofZE) we started hacking on open source tooling realizing the idea of safe development on production.\nNow, after long weeks in the making, we are extremely happy to announce the first release of `istio-workspace` project.\n\nWith this toolkit, we strive to enable developers to:\n\n> Develop their microservices locally, using the tools they love!\n>\n> Connect to other services in the cluster and test their changes!\n>\n> All of that without interfering with other developers and users!\n\nAll of it based on [CNCF](https://www.cncf.io/) open source projects such as [Istio](https://istio.io) and [Telepresence](https://telepresence.io).\n\n## How does it work?\n\n- `ike develop` wraps [Telepresence](https://telepresence.io) and let you start local development while being connected to the real services in the cluster\n\n - in addition, it will restart the process when any files have been changed (see `--watch` flag)\n\n- `istio-workspace` operator takes care of configuring routes in Istio so that only you can hit your service under development\n\nTo learn more head over to the [official docs](https://istio-workspace-docs.netlify.com/istio-workspace/v0.0.2/index.html).\n\n"
}
4 changes: 2 additions & 2 deletions pkg/cmd/version/releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package version
import (
"net/http"

"github.com/bartoszmajsak/template-golang/version"
"github.com/bartoszmajsak/github-changelog-generator/version"

"github.com/google/go-github/github"
"golang.org/x/net/context"
Expand All @@ -15,7 +15,7 @@ func LatestRelease() (string, error) {

client := github.NewClient(&httpClient)
latestRelease, _, err := client.Repositories.
GetLatestRelease(context.Background(), "bartoszmajsak", "template-golang")
GetLatestRelease(context.Background(), "bartoszmajsak", "github-changelog-generator")
if err != nil {
return "", err
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/version/releases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package version_test
import (
"gopkg.in/h2non/gock.v1"

"github.com/bartoszmajsak/template-golang/pkg/cmd/version"
v "github.com/bartoszmajsak/template-golang/version"
"github.com/bartoszmajsak/github-changelog-generator/pkg/cmd/version"
v "github.com/bartoszmajsak/github-changelog-generator/version"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand All @@ -14,7 +14,7 @@ var _ = Describe("Fetching latest release", func() {

BeforeEach(func() {
gock.New("https://api.github.com").
Get("/repos/bartoszmajsak/template-golang/releases/latest").
Get("/repos/bartoszmajsak/github-changelog-generator/releases/latest").
Reply(200).
File("fixtures/latest_release_is_v.0.0.2.json")
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/version/version_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"go.uber.org/goleak"

. "github.com/bartoszmajsak/template-golang/test"
. "github.com/bartoszmajsak/github-changelog-generator/test"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
Expand All @@ -18,6 +18,6 @@ func TestVersion(t *testing.T) {

var _ = SynchronizedAfterSuite(func() {}, func() {
goleak.VerifyNone(GinkgoT(),
goleak.IgnoreTopFunction("github.com/bartoszmajsak/template-golang/vendor/github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).registerForInterrupts"),
goleak.IgnoreTopFunction("github.com/bartoszmajsak/github-changelog-generator/vendor/github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).registerForInterrupts"),
)
})

0 comments on commit 77152d3

Please sign in to comment.