Enable uploading.
[goaljobs-goals.git] / libguestfs_upstream.ml
index 01b2a68..4c32dfd 100644 (file)
@@ -67,13 +67,12 @@ let rec goal website_updated version =
 
 (* Goal: website has been rsync'd. *)
 and website_rsync_done version =
-  let key = sprintf "libguestfs_website_rsync_done_%s" version.version in
-  target (memory_exists key);
-  onrun (fun () -> memory_set key "1");
+  target (url_contains_string "http://libguestfs.org" version.version &&
+          url_exists version.url);
 
   sh "
     cd %s
-    echo NOT RUNNING: . .rsync
+    ./.rsync
   " libguestfs_website_cvs
 
 (* Goal: Tarball added to CVS and CVS checked in. *)
@@ -88,8 +87,8 @@ and website_cvs_checked_in version =
   sh "
     cd %s
     cp %s/tarballs/%s %s
-    echo NOT RUNNING: cvs add -kb %s
-    echo NOT RUNNING: cvs ci -m \"Version %s\"
+    cvs add -kb %s
+    cvs ci -m \"Version %s\"
   " libguestfs_website_cvs
     buildtmp version.tarball version.urlpath
     version.urlpath
@@ -290,3 +289,19 @@ let () =
       let version = git_latest_version "master" in
       require (website_updated version)
   )
+
+(* Allow these jobs to run from the command line. *)
+let () =
+  publish "commit" (
+    function
+    | [commit] -> require (commit_tested "master" commit)
+    | [branch; commit] -> require (commit_tested branch commit)
+    | _ ->
+      failwith "use './libguestfs_upstream commit [<branch>] <commit>'"
+  );
+  publish "release" (
+    function
+    | [version] -> require (website_updated (vernames version))
+    | _ ->
+      failwith "use './libguestfs_upstream release <version>'"
+  )