-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
196 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
{ | ||
"Version": "0.0.1", | ||
"Changes": [ | ||
"fixed some bugs", | ||
"added new features", | ||
"new update space" | ||
] | ||
"Version": "0.0.0", | ||
"Changes": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package utils | ||
|
||
import ( | ||
"os/exec" | ||
|
||
git "github.com/go-git/go-git/v5" | ||
) | ||
|
||
func buildBinary() error { | ||
return exec.Command("go", "build", ".").Run() | ||
} | ||
|
||
func buildWithClone(tmpDir string) error { | ||
if err := gitClone(tmpDir); err != nil { | ||
return err | ||
} | ||
if err := exec.Command("go", "build", "tmp", "-o=bin/giga").Run(); err != nil { | ||
return err | ||
} | ||
exec.Command("rm", "-rf", tmpDir).Run() | ||
return nil | ||
} | ||
|
||
func gitPull() error { | ||
return exec.Command("git", "pull").Run() | ||
} | ||
|
||
func gitClone(dir string) error { | ||
_, err := git.PlainClone(dir, false, &git.CloneOptions{ | ||
URL: "https://github.com/GigaUserbot/GIGA", | ||
RecurseSubmodules: git.DefaultSubmoduleRecursionDepth, | ||
}) | ||
if err != nil { | ||
return err | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters