[Pkg-ofed-commits] [libfabric] 59/123: cron-run-all-md2nroff.pl: update without pushing to gh-pages

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Sat Oct 22 12:28:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

ana pushed a commit to annotated tag v1.1.1
in repository libfabric.

commit 2f1ff39f06b07585ca84cac47b9f7aa6169ceda0
Author: Jeff Squyres <jsquyres at cisco.com>
Date:   Wed Sep 9 03:42:31 2015 -0700

    cron-run-all-md2nroff.pl: update without pushing to gh-pages
    
    For the v1.1.x branch, we want to update the man pages, but we do
    *not* want to push to the gh-pages branch.
    
    So make it possible to not specify the --pages-branch CLI option, and
    skip that step if it is not specified.
    
    Signed-off-by: Jeff Squyres <jsquyres at cisco.com>
    
    (cherry picked from commit 7bde7f17bb06c166a83d7ec0bd6a6a6e6ed58d53)
---
 config/cron-run-all-md2nroff.pl | 42 +++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/config/cron-run-all-md2nroff.pl b/config/cron-run-all-md2nroff.pl
index 600751d..779e4da 100755
--- a/config/cron-run-all-md2nroff.pl
+++ b/config/cron-run-all-md2nroff.pl
@@ -34,8 +34,6 @@ die "Must specify a git repo"
     if (!defined($repo_arg));
 die "Must specify a git source branch"
     if (!defined($source_branch_arg));
-die "Must specify a git pages branch"
-    if (!defined($pages_branch_arg));
 
 #####################################################################
 
@@ -99,8 +97,10 @@ chdir($tmpdir);
 doit(0, "git clone --single-branch --branch $source_branch_arg $repo_arg source", "git-clone");
 
 # Next, git clone the pages branch of repo
-verbose("*** Cloning repo: $repo_arg / $pages_branch_arg...\n");
-doit(0, "git clone --single-branch --branch $pages_branch_arg $repo_arg pages", "git-clone2");
+if (defined($pages_branch_arg)) {
+    verbose("*** Cloning repo: $repo_arg / $pages_branch_arg...\n");
+    doit(0, "git clone --single-branch --branch $pages_branch_arg $repo_arg pages", "git-clone2");
+}
 
 #####################################################################
 
@@ -114,29 +114,31 @@ verbose("Found: @markdown_files\n");
 #####################################################################
 
 # Copy each of the markdown files to the pages branch checkout
-chdir("pages/master");
-foreach my $file (@markdown_files) {
-    doit(0, "cp ../../source/man/$file man/$file", "loop-cp");
+if (defined($pages_branch_arg)) {
+    chdir("pages/master");
+    foreach my $file (@markdown_files) {
+        doit(0, "cp ../../source/man/$file man/$file", "loop-cp");
+
+        # Is there a new man page?  If so, we need to "git add" it.
+        my $out = `git status --porcelain man/$file`;
+        doit(0, "git add man/$file", "loop-git-add")
+            if ($out =~ /^\?\?/);
+    }
 
-    # Is there a new man page?  If so, we need to "git add" it.
-    my $out = `git status --porcelain man/$file`;
-    doit(0, "git add man/$file", "loop-git-add")
-        if ($out =~ /^\?\?/);
+    # Git commit those files in the pages repo and push them to the
+    # upstream repo so that they go live.  If nothing changed, the commit
+    # and push will be no-ops.
+    chdir("..");
+    doit(1, "git commit --no-verify -a -m \"Updated Markdown man pages from $source_branch_arg\"",
+         "git-commit-first");
+    doit(1, "git push", "git-push-first");
 }
 
-# Git commit those files in the pages repo and push them to the
-# upstream repo so that they go live.  If nothing changed, the commit
-# and push will be no-ops.
-chdir("..");
-doit(1, "git commit --no-verify -a -m \"Updated Markdown man pages from $source_branch_arg\"",
-     "git-commit-first");
-doit(1, "git push", "git-push-first");
-
 #####################################################################
 
 # Now process each of the Markdown files in the source repo and
 # generate new nroff man pages.
-chdir("../source/man");
+chdir("$tmpdir/source/man");
 foreach my $file (@markdown_files) {
     doit(0, "../config/md2nroff.pl --source $file", "loop2-md2nroff");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libfabric.git



More information about the Pkg-ofed-commits mailing list