From 3a902458ef13e29f02f9ce01d15b675096b7f659 Mon Sep 17 00:00:00 2001 From: mpl Date: Wed, 30 Dec 2015 11:58:01 +0100 Subject: [PATCH] misc/docker: TODOs for public link and version stamping Change-Id: Ic1573ffa85e10e8f330676bfd7a19369763e4a4d --- misc/docker/dock.go | 2 ++ misc/docker/server/build-camlistore-server.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/misc/docker/dock.go b/misc/docker/dock.go index 769d91224..eef9c3c27 100644 --- a/misc/docker/dock.go +++ b/misc/docker/dock.go @@ -114,6 +114,7 @@ func genCamlistore(ctxDir string) { "--volume=" + ctxDir + "/camlistore.org:/OUT", "--volume=" + path.Join(dockDir, "server/build-camlistore-server.go") + ":" + genCamliProgram + ":ro", } + // TODO(mpl, bradfitz): pass the version to genCamliProgram so it can stamp it into camlistored when building it. if isWIP() { args = append(args, "--volume="+localCamliSource()+":/IN:ro", goDockerImage, goCmd, "run", genCamliProgram, "--rev="+rev(), "--camlisource=/IN") @@ -298,6 +299,7 @@ func uploadDockerImage() { log.Printf("Uploaded tarball to %s", versionedTarball) if !isWIP() { log.Printf("Copying tarball to %s/%s ...", bucket, tarball) + // TODO(mpl, bradfitz): restore the code that forces the destination tarball to be public, so we don't have to make it public manually through the google console. if _, err := stoClient.CopyObject(ctx, bucket, versionedTarball, bucket, tarball, nil); err != nil { log.Fatalf("Error uploading %v: %v", tarball, err) } diff --git a/misc/docker/server/build-camlistore-server.go b/misc/docker/server/build-camlistore-server.go index 79f534b1a..6008d6415 100644 --- a/misc/docker/server/build-camlistore-server.go +++ b/misc/docker/server/build-camlistore-server.go @@ -35,6 +35,7 @@ import ( ) var ( + // TODO(mpl): make the flags the same as in dock.go rev = flag.String("rev", "", "Camlistore revision to build (tag or commit hash)") localSrc = flag.String("camlisource", "", "(dev flag) Path to a local Camlistore source tree from which to build. It is ignored unless -rev=WORKINPROGRESS") outDir = flag.String("outdir", "/OUT/", "Output directory, where camlistored and all the resources will be written") @@ -115,6 +116,7 @@ func buildCamlistored() { os.Setenv("PATH", "/usr/local/go/bin:"+oldPath) os.Setenv("CGO_ENABLED", "0") os.Setenv("GO15VENDOREXPERIMENT", "1") + // TODO(mpl, bradfitz): stamp the 0.9 version here with ldflags if a version was passed as a flag to the program. cmd := exec.Command("go", "build", "-o", path.Join(*outDir, "/bin/camlistored"), `--ldflags`, "-w -d -linkmode internal -X camlistore.org/pkg/buildinfo.GitInfo="+*rev,