Skip to content

Commit

Permalink
chore(mods): upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
michakfromparis committed Dec 16, 2021
1 parent e586eda commit c819384
Show file tree
Hide file tree
Showing 30 changed files with 93 additions and 78 deletions.
6 changes: 3 additions & 3 deletions cmd/build.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cmd

import (
log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/sparks"
)

var buildCmd = &cobra.Command{
Expand Down
4 changes: 2 additions & 2 deletions cmd/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package cmd
import (
"os"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/conf"
)

// cleanCmd represents the clean command
Expand Down
4 changes: 2 additions & 2 deletions cmd/code.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package cmd

import (
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/sparks"
)

// codeCmd represents the code command
Expand Down
2 changes: 1 addition & 1 deletion cmd/common.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/michakfromparis/sparks/sparks"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/sparks"
)

var enabledPlatforms []bool
Expand Down
6 changes: 3 additions & 3 deletions cmd/get.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cmd

import (
log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/sparks"
)

var getCmd = &cobra.Command{
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package cmd

import (
log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/logger"
"github.com/michakfromparis/sparks/sparks"
"github.com/spf13/cobra"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/logger"
"leblox.com/sparks-cli/v2/sparks"
)

// rootCmd represents the base command when called without any subcommands
Expand Down
4 changes: 2 additions & 2 deletions conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path/filepath"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sys"
)

// GetDependencies stores the command line flag of go get --dependencies
Expand Down
4 changes: 1 addition & 3 deletions config/configurations.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package config

import (
"github.com/michakfromparis/sparks/sparks"
)
import "leblox.com/sparks-cli/v2/sparks"

// RegisterConfigurations registers all existing configurations into sparks
// TODO This should be replaced by a plugin system
Expand Down
2 changes: 1 addition & 1 deletion errx/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package errx

import (
log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
log "github.com/sirupsen/logrus"
)

// Fatal is used terminate the program with an error
Expand Down
24 changes: 24 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module leblox.com/sparks-cli/v2

go 1.17

require (
github.com/joomcode/errorx v1.0.3
github.com/sirupsen/logrus v1.8.1
)

require (
github.com/Sirupsen/logrus v1.0.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/michakfromparis/sparks v0.0.1 // indirect
github.com/spf13/cobra v1.3.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

require (
github.com/hashicorp/go-version v1.3.0
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d // indirect
)
4 changes: 2 additions & 2 deletions logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/sys"
)

// Init is called at the start of the program to intialize logrus
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/michakfromparis/sparks/cmd"
"github.com/michakfromparis/sparks/config"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/platform"
"leblox.com/sparks-cli/v2/cmd"
"leblox.com/sparks-cli/v2/config"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/platform"
)

func main() {
Expand Down
7 changes: 3 additions & 4 deletions platform/android.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package platform
import (
"path/filepath"

"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
"github.com/michakfromparis/sparks/sys"

log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// Android represents the Android platform
Expand Down
8 changes: 4 additions & 4 deletions platform/ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import (
"regexp"
"strings"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
"github.com/michakfromparis/sparks/sys"
log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// Ios represents the iOS platform
Expand Down
8 changes: 3 additions & 5 deletions platform/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import (
"path/filepath"

"github.com/michakfromparis/sparks/sys"

"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"

log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// Linux represents the Linux platform
Expand Down
8 changes: 4 additions & 4 deletions platform/osx.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"path/filepath"
"strings"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
"github.com/michakfromparis/sparks/sys"
log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// Osx represents the OSX platform
Expand Down
4 changes: 1 addition & 3 deletions platform/platforms.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package platform

import (
"github.com/michakfromparis/sparks/sparks"
)
import "leblox.com/sparks-cli/v2/sparks"

// RegisterPlatforms registers all existing platforms into sparks
// TODO This should be replaced by a plugin system
Expand Down
2 changes: 1 addition & 1 deletion platform/webgl.get.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"path/filepath"
"regexp"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/sys"
log "github.com/sirupsen/logrus"
)

func (w *WebGl) createEmscriptenSDKRoot() error {
Expand Down
7 changes: 3 additions & 4 deletions platform/webgl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import (

"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/sys"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// WebGl represents the WebGl platform
Expand Down
7 changes: 3 additions & 4 deletions platform/windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package platform
import (
"path/filepath"

"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sparks"

log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sparks"
)

// Windows represents the Windows platform
Expand Down
8 changes: 4 additions & 4 deletions sparks/cmake.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"strconv"
"strings"

"github.com/hashicorp/go-version"
log "github.com/sirupsen/logrus"
version "github.com/hashicorp/go-version"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sys"
)

// CMake is a wrapper class around cmake
Expand Down
2 changes: 1 addition & 1 deletion sparks/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/sys"
)

// Deps is a wrapper class around platform specific dependencies installer
Expand Down
6 changes: 3 additions & 3 deletions sparks/lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"path/filepath"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sys"
)

func getToluaPath() string {
Expand Down
2 changes: 1 addition & 1 deletion sparks/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package sparks

import (
log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/sys"
"leblox.com/sparks-cli/v2/sys"
)

// Platform Interface used to represent a sparks supported platform
Expand Down
4 changes: 2 additions & 2 deletions sparks/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"path/filepath"
"strings"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
log "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2"
"leblox.com/sparks-cli/v2/conf"
)

// Product struct
Expand Down
8 changes: 4 additions & 4 deletions sparks/sparks.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"path/filepath"
"time"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sys"
log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sys"
)

// CurrentProduct holds a reference to the currently loaded Sparks product from a .sparks file
Expand Down
8 changes: 4 additions & 4 deletions sparks/xcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"regexp"
"strings"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
"github.com/michakfromparis/sparks/conf"
"github.com/michakfromparis/sparks/errx"
"github.com/michakfromparis/sparks/sys"
log "github.com/sirupsen/logrus"
"leblox.com/sparks-cli/v2/conf"
"leblox.com/sparks-cli/v2/errx"
"leblox.com/sparks-cli/v2/sys"
)

// SigningType represents the type of signing used to sign an OSX or iOS application
Expand Down
2 changes: 1 addition & 1 deletion sys/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"sync"
"time"

log "github.com/sirupsen/logrus"
"github.com/joomcode/errorx"
log "github.com/sirupsen/logrus"
)

// Execute runs a command naked
Expand Down
4 changes: 2 additions & 2 deletions sys/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

log "github.com/sirupsen/logrus"
"github.com/michakfromparis/sparks/errx"
"leblox.com/sparks-cli/v2/errx"
)

// MkDir creates the directory at path and all subdirectories
Expand Down Expand Up @@ -44,7 +44,7 @@ func Pwd() (string, error) {

// SedFile searches regex inside filename and replaces it by newContent
func SedFile(filename string, regex string, newContent string) {
log.Tracef("sed %s %s in %s", regex, newContent, filename)
// log.Tracef("sed %s %s in %s", regex, newContent, filename)
bytes, err := ioutil.ReadFile(filename)
if err != nil {
errx.Fatalf(err, "Could not read: "+filename)
Expand Down
Loading

0 comments on commit c819384

Please sign in to comment.