mirror of https://github.com/perkeep/perkeep.git
update dev-server and dev-blobserver (but dev-blobserver still broken on start-up)
Change-Id: I327cf8d2ec8c4a9c563df28ca76c75a75b62e21c
This commit is contained in:
parent
a229abeebd
commit
31e160f6b9
|
@ -8,6 +8,8 @@ sub usage {
|
|||
die "Usage: dev-blobserver [--wipe] [--tls] <portnumber> -- [other_blobserver_opts]";
|
||||
}
|
||||
|
||||
chdir $Bin or die;
|
||||
|
||||
my $opt_wipe;
|
||||
my $opt_tls;
|
||||
GetOptions(
|
||||
|
@ -19,9 +21,13 @@ my $port = shift;
|
|||
$port = "3179" unless defined($port);
|
||||
usage() unless $port =~ /^\d+$/;
|
||||
|
||||
system("./build.pl", "server/go/camlistored") and die "Failed to build.\n";
|
||||
unless ($ENV{GOPATH}) {
|
||||
$ENV{GOPATH} = "$Bin/gopath"
|
||||
}
|
||||
|
||||
my $root = "/tmp/camliroot/port$port/";
|
||||
system("go", "install", "./server/camlistored") and die "Failed to build camlistored";
|
||||
|
||||
my $root = "/tmp/camliroot-$ENV{USER}/port$port/";
|
||||
if ($opt_wipe && -d $root) {
|
||||
print "Wiping $root\n";
|
||||
system("rm", "-rf", $root) and die "Failed to wipe $root.\n";
|
||||
|
@ -37,8 +43,9 @@ $ENV{CAMLI_PORT} = $port;
|
|||
$ENV{CAMLI_ROOT} = $root;
|
||||
$ENV{CAMLI_TLS_CRT_FILE} = $opt_tls ? "$Bin/config/dev-tls.crt" : "";
|
||||
$ENV{CAMLI_TLS_KEY_FILE} = $opt_tls ? "$Bin/config/dev-tls.key" : "";
|
||||
exec("$FindBin::Bin/server/go/camlistored/camlistored",
|
||||
exec("$ENV{GOPATH}/bin/camlistored",
|
||||
"-configfile=$Bin/config/dev-blobserver-config.json",
|
||||
"-listen=127.0.0.1:$port",
|
||||
@ARGV);
|
||||
|
||||
die "exec failure: $!\n";
|
||||
|
|
|
@ -39,8 +39,12 @@ my $port = shift;
|
|||
$port = "3179" unless defined($port);
|
||||
usage() unless $port =~ /^\d+$/;
|
||||
|
||||
unless ($ENV{GOPATH}) {
|
||||
$ENV{GOPATH} = "$Bin/gopath"
|
||||
}
|
||||
|
||||
unless ($opt_nobuild) {
|
||||
system("go", "build", "-o", "./gopath/bin/camlistored", "./server/camlistored") and die "Failed to build camlistored";
|
||||
system("go", "install", "./server/camlistored") and die "Failed to build camlistored";
|
||||
# TODO-GO1: FIX: system("./build.pl", "clients/go/camdbinit") and die "Failed to build camdbinit";
|
||||
}
|
||||
|
||||
|
@ -131,7 +135,8 @@ unless ($opt_staticres) {
|
|||
$ENV{CAMLI_DEV_UI_FILES} = "$FindBin::Bin/server/camlistored/ui"; # set in server/camlistored/ui/fileembed.go
|
||||
}
|
||||
|
||||
exec("./gopath/bin/camlistored",
|
||||
exec("$ENV{GOPATH}/bin/camlistored",
|
||||
"-configfile=$Bin/config/dev-server-config.json",
|
||||
"-listen=$listen",
|
||||
@ARGV);
|
||||
die "exec failure: $!\n";
|
||||
|
|
Loading…
Reference in New Issue