From 2b21bd85492db46a7e78b6c52b1d0a83c44119a9 Mon Sep 17 00:00:00 2001 From: Elia Bracci Date: Tue, 20 Dec 2022 17:59:05 +0100 Subject: [PATCH] Revert "Replaced warrensbox with EliaBracciSumo" This reverts commit 19759dc0225507c3beaa9692381f2dbfa4513883. --- .circleci/config.yml | 8 ++++---- .goreleaser.yml | 8 ++++---- Makefile | 4 ++-- go.mod | 2 +- lib/command_test.go | 2 +- lib/download_test.go | 2 +- lib/files.go | 18 +++++++++--------- lib/files_test.go | 4 ++-- lib/list_versions_test.go | 6 +++--- lib/symlink_test.go | 2 +- main.go | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb78522..15f853c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: docker: - image: circleci/golang:1.17 - working_directory: /go/src/github.com/EliaBracciSumo/tgswitch + working_directory: /go/src/github.com/warrensbox/tgswitch steps: - checkout @@ -24,7 +24,7 @@ jobs: docker: - image: circleci/golang:1.17 - working_directory: /go/src/github.com/EliaBracciSumo/tgswitch + working_directory: /go/src/github.com/warrensbox/tgswitch steps: - checkout @@ -37,10 +37,10 @@ jobs: export RELEASE_VERSION; echo $RELEASE_VERSION mkdir -p /home/circleci/bin - export PATH="/home/EliaBracciSumo/bin:${PATH}" + export PATH="/home/warrensbox/bin:${PATH}" rm -rf dist git config user.email "warren.veerasingam@gmail.com" - git config user.name "EliaBracciSumo" + git config user.name "warrensbox" git tag -a ${RELEASE_VERSION} -m "Release Version" git push origin ${RELEASE_VERSION} curl -L https://git.io/goreleaser | bash diff --git a/.goreleaser.yml b/.goreleaser.yml index c808e80..29321eb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -46,12 +46,12 @@ brews: # GitHub/GitLab repository to push the formula to # Gitea is not supported yet, but the support coming tap: - owner: EliaBracciSumo + owner: warrensbox name: homebrew-tap # Reporitory to push the tap to. # github: - # owner: EliaBracciSumo + # owner: warrensbox # name: homebrew-tap # Allows you to set a custom download strategy. @@ -61,8 +61,8 @@ brews: # Git author used to commit to the repository. # Defaults are shown. commit_author: - name: EliaBracciSumo - email: ebracci@sumologic.com + name: Warren Veerasingam + email: warren.veerasingam@gmail.com # Folder inside the repository to put the formula. # Default is the root folder. diff --git a/Makefile b/Makefile index 32e86cf..3b0e6d8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ EXE := tgswitch -PKG := github.com/EliaBracciSumo/tgswitch -VER := $(shell { git ls-remote --tags . 2>/dev/null || git ls-remote --tags git@github.com:EliaBracciSumo/tgswitch.git; } | awk '{if ($$2 ~ "\\^\\{\\}$$") next; print vers[split($$2,vers,"\\/")]}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -1) +PKG := github.com/warrensbox/tgswitch +VER := $(shell { git ls-remote --tags . 2>/dev/null || git ls-remote --tags git@github.com:warrensbox/tgswitch.git; } | awk '{if ($$2 ~ "\\^\\{\\}$$") next; print vers[split($$2,vers,"\\/")]}' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -1) PATH := build:$(PATH) GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) diff --git a/go.mod b/go.mod index 72c9af0..9fc3c2e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/EliaBracciSumo/tgswitch +module github.com/warrensbox/tgswitch go 1.16 diff --git a/lib/command_test.go b/lib/command_test.go index 60be285..41c07ba 100644 --- a/lib/command_test.go +++ b/lib/command_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/EliaBracciSumo/tgswitch/lib" + "github.com/warrensbox/tgswitch/lib" ) // TestNewCommand : pass value and check if returned value is a pointer diff --git a/lib/download_test.go b/lib/download_test.go index 217de7a..58cc223 100644 --- a/lib/download_test.go +++ b/lib/download_test.go @@ -9,7 +9,7 @@ import ( "runtime" "testing" - lib "github.com/EliaBracciSumo/tgswitch/lib" + lib "github.com/warrensbox/tgswitch/lib" ) // TestDownloadFromURL_FileNameMatch : Check expected filename exist when downloaded diff --git a/lib/files.go b/lib/files.go index fab211d..df526a2 100644 --- a/lib/files.go +++ b/lib/files.go @@ -46,7 +46,7 @@ func CheckFileExist(file string) bool { return true } -// CreateDirIfNotExist : create directory if directory does not exist +//CreateDirIfNotExist : create directory if directory does not exist func CreateDirIfNotExist(dir string) { if _, err := os.Stat(dir); os.IsNotExist(err) { log.Printf("Creating directory for terragrunt: %v", dir) @@ -58,7 +58,7 @@ func CreateDirIfNotExist(dir string) { } } -// WriteLines : writes into file +//WriteLines : writes into file func WriteLines(lines []string, path string) (err error) { var ( file *os.File @@ -110,7 +110,7 @@ func ReadLines(path string) (lines []string, err error) { return } -// IsDirEmpty : check if directory is empty (TODO UNIT TEST) +//IsDirEmpty : check if directory is empty (TODO UNIT TEST) func IsDirEmpty(name string) bool { exist := false @@ -128,7 +128,7 @@ func IsDirEmpty(name string) bool { return exist // Either not empty or error, suits both cases } -// CheckDirHasTGBin : // check binary exist (TODO UNIT TEST) +//CheckDirHasTGBin : // check binary exist (TODO UNIT TEST) func CheckDirHasTGBin(dir, prefix string) bool { exist := false @@ -148,9 +148,9 @@ func CheckDirHasTGBin(dir, prefix string) bool { return exist } -// CheckDirExist : check if directory exist -// dir=path to file -// return path to directory +//CheckDirExist : check if directory exist +//dir=path to file +//return path to directory func CheckDirExist(dir string) bool { if _, err := os.Stat(dir); os.IsNotExist(err) { return false @@ -205,11 +205,11 @@ func ReadingFileMsg(filename string) { fmt.Printf("Reading file %s \n", filename) } -// retrive file content of regular file +//retrive file content of regular file func RetrieveFileContents(file string) string { fileContents, err := ioutil.ReadFile(file) if err != nil { - log.Fatalf("Error: %s\nFailed to read %s file. Follow the README.md instructions for setup. https://github.com/EliaBracciSumo/tgswitch/blob/master/README.md\n", err, file) + log.Fatalf("Error: %s\nFailed to read %s file. Follow the README.md instructions for setup. https://github.com/warrensbox/tgswitch/blob/master/README.md\n", err, file) } tgversion := strings.TrimSuffix(string(fileContents), "\n") return tgversion diff --git a/lib/files_test.go b/lib/files_test.go index 7dc317b..439f788 100644 --- a/lib/files_test.go +++ b/lib/files_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/EliaBracciSumo/tgswitch/lib" + "github.com/warrensbox/tgswitch/lib" ) // TestRenameFile : Create a file, check filename exist, @@ -130,7 +130,7 @@ func TestCreateDirIfNotExist(t *testing.T) { cleanUp(installLocation) } -// TestWriteLines : write to file, check readline to verify +//TestWriteLines : write to file, check readline to verify func TestWriteLines(t *testing.T) { installPath := "/.terragrunt.versions_test/" diff --git a/lib/list_versions_test.go b/lib/list_versions_test.go index 36eaf9a..59646a8 100644 --- a/lib/list_versions_test.go +++ b/lib/list_versions_test.go @@ -4,14 +4,14 @@ import ( "log" "testing" - "github.com/EliaBracciSumo/tgswitch/lib" + "github.com/warrensbox/tgswitch/lib" ) const ( gruntURL = "https://api.github.com/repos/gruntwork-io/terragrunt/releases" ) -// TestRemoveDuplicateVersions : test to removed duplicate +//TestRemoveDuplicateVersions : test to removed duplicate func TestRemoveDuplicateVersions(t *testing.T) { test_array := []string{"0.0.1", "0.0.2", "0.0.3", "0.0.1"} @@ -25,7 +25,7 @@ func TestRemoveDuplicateVersions(t *testing.T) { } } -// TestValidVersionFormat : test if func returns valid version format +//TestValidVersionFormat : test if func returns valid version format // more regex testing at https://rubular.com/r/UvWXui7EU2icSb func TestValidVersionFormat(t *testing.T) { diff --git a/lib/symlink_test.go b/lib/symlink_test.go index 5ff3b4e..97a2ea1 100644 --- a/lib/symlink_test.go +++ b/lib/symlink_test.go @@ -6,7 +6,7 @@ import ( "os/user" "testing" - "github.com/EliaBracciSumo/tgswitch/lib" + "github.com/warrensbox/tgswitch/lib" ) // TestCreateSymlink : check if symlink exist-remove if exist, diff --git a/main.go b/main.go index 1ea9a5c..9413610 100644 --- a/main.go +++ b/main.go @@ -22,12 +22,12 @@ import ( "path/filepath" "strings" - lib "github.com/EliaBracciSumo/tgswitch/lib" "github.com/hashicorp/hcl2/gohcl" "github.com/hashicorp/hcl2/hclparse" "github.com/manifoldco/promptui" "github.com/pborman/getopt" "github.com/spf13/viper" + lib "github.com/warrensbox/tgswitch/lib" ) const (