Skip to content

Commit

Permalink
chore: moving repos from go-gilt to gilt
Browse files Browse the repository at this point in the history
Fixes: #107
  • Loading branch information
retr0h committed Jan 20, 2024
1 parent e6f2d6d commit d868e5e
Show file tree
Hide file tree
Showing 32 changed files with 83 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ brews:
name: homebrew-tap
folder: Formula
goarm: "7"
homepage: https://github.com/retr0h/go-gilt
homepage: https://github.com/retr0h/gilt
description: A GIT layering tool
license: MIT
test: |
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![codecov](https://img.shields.io/codecov/c/github/retr0h/go-gilt?token=clAMnFQCEQ&style=flat-square)](https://codecov.io/gh/retr0h/go-gilt)
[![go report card](https://goreportcard.com/badge/github.com/retr0h/go-gilt?style=flat-square)](https://goreportcard.com/report/github.com/retr0h/go-gilt)
[![codecov](https://img.shields.io/codecov/c/github/retr0h/gilt?token=clAMnFQCEQ&style=flat-square)](https://codecov.io/gh/retr0h/gilt)
[![go report card](https://goreportcard.com/badge/github.com/retr0h/gilt?style=flat-square)](https://goreportcard.com/report/github.com/retr0h/gilt)
[![license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)

# Gilt
Expand All @@ -22,9 +22,9 @@ this. Currently, this is proving useful for overlaying [Helm charts][].

[Installation][] | [Usage][] | [Documentation][]

[Installation]: https://retr0h.github.io/go-gilt/installation
[Usage]: https://retr0h.github.io/go-gilt/usage
[Documentation]: https://retr0h.github.io/go-gilt/
[Installation]: https://retr0h.github.io/gilt/installation
[Usage]: https://retr0h.github.io/gilt/usage
[Documentation]: https://retr0h.github.io/gilt/

## License

Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/spf13/viper"
"gopkg.in/yaml.v3"

"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/pkg/config"
)

// initCmd represents the init command
Expand Down
2 changes: 1 addition & 1 deletion cmd/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package cmd
import (
"github.com/spf13/cobra"

"github.com/retr0h/go-gilt/pkg/repositories"
"github.com/retr0h/gilt/pkg/repositories"
)

// overlayCmd represents the overlay command
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/spf13/viper"
"golang.org/x/term"

"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/pkg/config"
)

var (
Expand All @@ -41,7 +41,7 @@ var (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "go-gilt",
Use: "gilt",
Short: "A GIT layering command line tool",
Long: `
o o
Expand All @@ -54,7 +54,7 @@ var rootCmd = &cobra.Command{
A GIT layering command line tool.
https://github.com/retr0h/go-gilt
https://github.com/retr0h/gilt
`,
}

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ The config file can be overriden/defined through env vars.
GILT_GILTFILE=Giltfile.yaml \
GILT_GILTDIR=~/.gilt/clone \
GILT_DEBUG=false \
go-gilt overlay
gilt overlay
```

## Command Flags

The config file and/or env vars can be overriden/defined through cli flags.

```bash
go-gilt \
gilt \
--gilt-file=Giltfile.yaml \
--gilt-dir=~/.gilt/clone \
--debug \
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ answer questions.
If you have questions, feel free open a [Discussion][] on GitHub.

<!-- prettier-ignore-start -->
[Gilt]: https://github.com/retr0h/go-gilt
[Gilt]: https://github.com/retr0h/gilt
[Go]: https://go.dev
[Node.js]: https://nodejs.org/en/
[gofumpt]: https://github.com/mvdan/gofumpt
[golangci-lint]: https://golangci-lint.run
[Prettier]: https://prettier.io/
[Docusaurus]: https://docusaurus.io
[Discussion]: https://github.com/retr0h/go-gilt/discussions
[Discussion]: https://github.com/retr0h/gilt/discussions
[Conventional Commits]: https://www.conventionalcommits.org
[Bats]: https://github.com/bats-core/bats-core
<!-- prettier-ignore-end -->
4 changes: 2 additions & 2 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ sidebar_position: 2
## Homebrew Tap

```bash
brew install retr0h/tap/go-gilt
brew install retr0h/tap/gilt
```

## Go Install

```bash
go install github.com/retr0h/go-gilt@latest
go install github.com/retr0h/gilt@latest
```
10 changes: 5 additions & 5 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const config = {
url: 'https://retr0h.github.io/',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/go-gilt/',
baseUrl: '/gilt/',
trailingSlash: false,

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'retr0h', // Usually your GitHub org/user name.
projectName: 'go-gilt', // Usually your repo name.
projectName: 'gilt', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand Down Expand Up @@ -85,7 +85,7 @@ const config = {
position: 'right',
},
{
href: 'https://github.com/retr0h/go-gilt',
href: 'https://github.com/retr0h/gilt',
position: 'right',
className: 'header-github-link',
'aria-label': 'GitHub repository',
Expand All @@ -100,7 +100,7 @@ const config = {
items: [
{
label: 'GitHub',
href: 'https://github.com/retr0h/go-gilt',
href: 'https://github.com/retr0h/gilt',
},
],
},
Expand All @@ -119,7 +119,7 @@ const config = {
},
announcementBar: {
id: 'announcementBar-3', // Increment on change
content: `🎉️ Gilt has been 💯 rewritten in Go, <b><a target="_blank" href="https://github.com/retr0h/go-gilt/releases/tag/v2.0.2">v2.0.2</a> is now available!</b> 🥳️`,
content: `🎉️ Gilt has been 💯 rewritten in Go, <b><a target="_blank" href="https://github.com/retr0h/gilt/releases/tag/v2.0.2">v2.0.2</a> is now available!</b> 🥳️`,
},
}),
};
Expand Down
10 changes: 5 additions & 5 deletions examples/go-client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ module example.com/client

go 1.21.0

replace github.com/retr0h/go-gilt => ../../../go-gilt/
replace github.com/retr0h/gilt => ../../../gilt/

require (
github.com/lmittmann/tint v1.0.3
github.com/retr0h/go-gilt v1.0.2
github.com/lmittmann/tint v1.0.4
github.com/retr0h/gilt v1.0.2
)

require (
github.com/danjacques/gofslock v0.0.0-20230728142113-ae8f59f9e88b // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.16.0 // indirect
github.com/go-playground/validator/v10 v10.17.0 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/spf13/afero v1.11.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
)
12 changes: 6 additions & 6 deletions examples/go-client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE=
github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74=
github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/lmittmann/tint v1.0.3 h1:W5PHeA2D8bBJVvabNfQD/XW9HPLZK1XoPZH0cq8NouQ=
github.com/lmittmann/tint v1.0.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc=
github.com/lmittmann/tint v1.0.4/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -38,8 +38,8 @@ golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
4 changes: 2 additions & 2 deletions examples/go-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/lmittmann/tint"

"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/go-gilt/pkg/repositories"
"github.com/retr0h/gilt/pkg/config"
"github.com/retr0h/gilt/pkg/repositories"
)

type repositoriesManager interface {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/retr0h/go-gilt
module github.com/retr0h/gilt

go 1.21.0

Expand Down
4 changes: 2 additions & 2 deletions internal/exec/exec_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/retr0h/go-gilt/internal"
"github.com/retr0h/go-gilt/internal/exec"
"github.com/retr0h/gilt/internal"
"github.com/retr0h/gilt/internal/exec"
)

type ExecManagerPublicTestSuite struct {
Expand Down
8 changes: 4 additions & 4 deletions internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// DEALINGS IN THE SOFTWARE.

// Package git package needs reworked into proper Git libraries. However, this
// package will remain using exec as it was easiest to port from go-gilt's
// package will remain using exec as it was easiest to port from gilt's
// python counterpart.
package git

Expand All @@ -30,7 +30,7 @@ import (

"github.com/spf13/afero"

"github.com/retr0h/go-gilt/internal"
"github.com/retr0h/gilt/internal"
)

// New factory to create a new Git instance.
Expand All @@ -46,7 +46,7 @@ func New(
}
}

// Git clone repo. This is a bare repo, with only metadata to start with.
// Clone the repo. This is a bare repo, with only metadata to start with.
func (g *Git) Clone(
gitURL string,
cloneDir string,
Expand All @@ -57,7 +57,7 @@ func (g *Git) Clone(
)
}

// Create a working tree from the repo in `cloneDir` at `version` in `dstDir`.
// Worktree create a working tree from the repo in `cloneDir` at `version` in `dstDir`.
// Under the covers, this will download any/all required objects from origin
// into the cache
func (g *Git) Worktree(
Expand Down
6 changes: 3 additions & 3 deletions internal/git/git_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/retr0h/go-gilt/internal"
"github.com/retr0h/go-gilt/internal/git"
"github.com/retr0h/go-gilt/internal/mocks/exec"
"github.com/retr0h/gilt/internal"
"github.com/retr0h/gilt/internal/git"
"github.com/retr0h/gilt/internal/mocks/exec"
)

type GitManagerPublicTestSuite struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/git/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/spf13/afero"

"github.com/retr0h/go-gilt/internal"
"github.com/retr0h/gilt/internal"
)

// Git implementation responsible for Git operations.
Expand Down
2 changes: 1 addition & 1 deletion internal/mocks/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package mocks

import (
"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/pkg/config"
)

// RepositoryManager manager responsible for Repository operations.
Expand Down
2 changes: 1 addition & 1 deletion internal/mocks/repository/repository_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/path/path_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/retr0h/go-gilt/internal/path"
"github.com/retr0h/gilt/internal/path"
)

type PathPublicTestSuite struct {
Expand Down
11 changes: 4 additions & 7 deletions internal/repositories/repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (

"github.com/spf13/afero"

"github.com/retr0h/go-gilt/internal"
intPath "github.com/retr0h/go-gilt/internal/path"
"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/internal"
intPath "github.com/retr0h/gilt/internal/path"
"github.com/retr0h/gilt/pkg/config"
)

// New factory to create a new Repository instance.
Expand Down Expand Up @@ -116,10 +116,7 @@ func (r *Repositories) Overlay() error {
if err := r.repoManager.Worktree(c, targetDir, tmpClone); err != nil {
return err
}
if err := r.repoManager.CopySources(c, tmpClone); err != nil {
return err
}
return nil
return r.repoManager.CopySources(c, tmpClone)
})
if err != nil {
return err
Expand Down
10 changes: 5 additions & 5 deletions internal/repositories/repositories_public_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/retr0h/go-gilt/internal"
"github.com/retr0h/go-gilt/internal/mocks/exec"
"github.com/retr0h/go-gilt/internal/mocks/repository"
"github.com/retr0h/go-gilt/internal/repositories"
"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/internal"
"github.com/retr0h/gilt/internal/mocks/exec"
"github.com/retr0h/gilt/internal/mocks/repository"
"github.com/retr0h/gilt/internal/repositories"
"github.com/retr0h/gilt/pkg/config"
)

type RepositoriesPublicTestSuite struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/repositories/repositories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"

"github.com/retr0h/go-gilt/internal/mocks/exec"
"github.com/retr0h/go-gilt/internal/mocks/repository"
"github.com/retr0h/go-gilt/pkg/config"
"github.com/retr0h/gilt/internal/mocks/exec"
"github.com/retr0h/gilt/internal/mocks/repository"
"github.com/retr0h/gilt/pkg/config"
)

type RepositoriesTestSuite struct {
Expand Down
Loading

0 comments on commit d868e5e

Please sign in to comment.