Skip to content

Commit

Permalink
Add TODO to remove PKGS after upgrading to Go 1.9. Change repository
Browse files Browse the repository at this point in the history
path output. Update README.
  • Loading branch information
andornaut committed Feb 23, 2018
1 parent bbc066f commit 705c64f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ install: $(TARGET)

release: clean $(PLATFORMS)

# TODO switch to go test ./... after upgrading to Go>=1.9
test:
go test -v $(PKGS)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export GOG_DEFAULT_REPOSITORY_PATH="${XDG_DATA_HOME}/gog/dotfiles"
## Developing

```bash
# Install `dep`, ensure that `./vendor/` is up to date, and build `./gog`
# Install `dep`, ensure that `./vendor/` is up to date, and compile `./gog`
make

# Build and install to /usr/local/bin/gog
# Compile and install to /usr/local/bin/gog
make install

# Delete /usr/local/bin/gog
Expand All @@ -136,6 +136,6 @@ make uninstall
# Run tests
make test

# Build release binaries in `./dist/`
# Compile release binaries in `./dist/`
make release
```
3 changes: 0 additions & 3 deletions cmd/addremove.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"fmt"
"os"
"path"
"path/filepath"
Expand All @@ -17,7 +16,6 @@ func RunAdd(repoName string, paths []string) error {
if err != nil {
return err
}
fmt.Printf("repository: %s\n---\n", repoPath)

paths = cleanPaths(paths)
if err := updateRepository(repoPath, paths, repository.AddPath); err != nil {
Expand All @@ -32,7 +30,6 @@ func RunRemove(repoName string, paths []string) error {
if err != nil {
return err
}
fmt.Printf("repository: %s\n---\n", repoPath)

paths = cleanPaths(paths)
if err := updateLinks(repoPath, paths, link.UnlinkDir, link.UnlinkFile); err != nil {
Expand Down
3 changes: 0 additions & 3 deletions cmd/apply.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cmd

import (
"fmt"

"github.com/andornaut/gog/link"
"github.com/andornaut/gog/repository"
)
Expand All @@ -13,7 +11,6 @@ func RunApply(repoName string) error {
if err != nil {
return err
}
fmt.Printf("repository: %s\n---\n", repoPath)

return link.Dir(repoPath, repoPath)
}
3 changes: 0 additions & 3 deletions cmd/git.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package cmd

import (
"fmt"

"github.com/andornaut/gog/git"
"github.com/andornaut/gog/repository"
)
Expand All @@ -13,7 +11,6 @@ func RunGit(repoName string, arguments []string) error {
if err != nil {
return err
}
fmt.Printf("repository: %s\n---\n", repoPath)

return git.Run(repoPath, arguments)
}
6 changes: 6 additions & 0 deletions repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func GetDefault() (string, error) {
if err := validateRepoPath(p); err != nil {
return "", err
}
printPath(p)
return p, nil
}

Expand All @@ -77,6 +78,7 @@ func RootPath(name string) (string, error) {
if err := validateRepoPath(p); err != nil {
return "", err
}
printPath(p)
return p, nil
}

Expand All @@ -94,6 +96,10 @@ func getFirst() (string, error) {
return "", fmt.Errorf("run `gog repository add` to add a repository")
}

func printPath(p string) {
fmt.Printf("REPOSITORY: %s\n---\n", p)
}

func init() {
homeDir = os.Getenv("HOME")
if homeDir == "" {
Expand Down

0 comments on commit 705c64f

Please sign in to comment.