-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/{go.mod, go.sum, utils}: doltgres builder utility
- Loading branch information
1 parent
9262b49
commit ed1b72d
Showing
5 changed files
with
259 additions
and
30 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
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,40 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"flag" | ||
"fmt" | ||
"log" | ||
"os" | ||
|
||
builder "github.com/dolthub/doltgresql/utils/doltgres_builder" | ||
) | ||
|
||
func main() { | ||
flag.Parse() | ||
if len(os.Args) < 1 { | ||
printHelpAndExit() | ||
} | ||
parserScriptPath := os.Args[1] | ||
commitList := os.Args[2:] | ||
if len(commitList) < 1 { | ||
printHelpAndExit() | ||
} | ||
err := builder.Run(context.Background(), parserScriptPath, commitList) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
os.Exit(0) | ||
} | ||
|
||
func printHelpAndExit() { | ||
helpStr := "doltgres-builder takes DoltgreSQL commit shas or tags as arguments\n" + | ||
"and builds corresponding binaries to a path specified\n" + | ||
"by DOLTGRES_BIN\n" + | ||
"If DOLTGRES_BIN is not set, ./doltgresBin will be used\n" + | ||
"usage: doltgres-builder /path/to/parser/build/script dccba46 4bad226 ...\n" + | ||
"usage: doltgres-builder /path/to/parser/build/script v0.19.0 v0.22.6 ...\n" + | ||
"set DEBUG=1 to run in debug mode\n" | ||
fmt.Print(helpStr) | ||
os.Exit(2) | ||
} |
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,5 @@ | ||
package doltgres_builder | ||
|
||
const ( | ||
GithubDoltgres = "https://github.com/dolthub/doltgresql.git" | ||
) |
Oops, something went wrong.