Return-Path: X-Original-To: apmail-falcon-commits-archive@minotaur.apache.org Delivered-To: apmail-falcon-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AD0E190EF for ; Thu, 10 Mar 2016 10:47:00 +0000 (UTC) Received: (qmail 7407 invoked by uid 500); 10 Mar 2016 10:47:00 -0000 Delivered-To: apmail-falcon-commits-archive@falcon.apache.org Received: (qmail 7372 invoked by uid 500); 10 Mar 2016 10:47:00 -0000 Mailing-List: contact commits-help@falcon.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.apache.org Delivered-To: mailing list commits@falcon.apache.org Received: (qmail 7362 invoked by uid 99); 10 Mar 2016 10:47:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 10:47:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 35307DFB8A; Thu, 10 Mar 2016 10:47:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pallavi@apache.org To: commits@falcon.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: falcon git commit: Script to copy docs from release branch Date: Thu, 10 Mar 2016 10:47:00 +0000 (UTC) Repository: falcon Updated Branches: refs/heads/asf-site 4e4b8457d -> 3c2973890 Script to copy docs from release branch Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/3c297389 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/3c297389 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/3c297389 Branch: refs/heads/asf-site Commit: 3c2973890e0ceb9f42f3d281394c6873d326f492 Parents: 4e4b845 Author: Pallavi Rao Authored: Thu Mar 10 16:16:41 2016 +0530 Committer: Pallavi Rao Committed: Thu Mar 10 16:16:41 2016 +0530 ---------------------------------------------------------------------- fetch-docs.py | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ pom.template | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/3c297389/fetch-docs.py ---------------------------------------------------------------------- diff --git a/fetch-docs.py b/fetch-docs.py new file mode 100644 index 0000000..b1e5fee --- /dev/null +++ b/fetch-docs.py @@ -0,0 +1,59 @@ +#!/usr/bin/python + +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Usage: +# $ python fetch-docs.py +import traceback +import subprocess +import os +import shutil + +def run_cmd(cmd): + try: + print "Running command: %s" % cmd + output = subprocess.check_output(cmd, shell=True) + return output + except: + traceback.print_exc() + sys.exit(1) + +def create_pom(branch): + f1 = open('pom.template', 'r') + f2 = open('trunk/releases/%s/pom.xml' % branch, 'w') + for line in f1: + f2.write(line.replace('${branch}', branch)) + f1.close() + f2.close() + +branch = raw_input("Enter the Falcon branch from which you wish to copy the docs :") +# Copy docs from the branch into asf-site +print("Copy docs from https://git-wip-us.apache.org/repos/asf/falcon.git, branch %s" % branch) +os.mkdir("trunk/releases/%s" % branch) +run_cmd("git checkout origin/%s docs/src" % branch) +run_cmd("cp -r docs/src/site/ trunk/general/src/site") +os.rename("docs/src", "trunk/releases/%s/src" % branch) +run_cmd("git rm -r -f docs") +# Update poms +create_pom(branch) +print("Copied docs from branch %s " % branch) +print("To publish the new docs to falcon site do the following:") +print("1. Update trunk/releases/pom.xml to add the new doc module fetched") +print("2. Update trunk/pom.xml to new version. Update the team members list, if required.") +print("3. Update trunk/general/src/site/site.xml to add links to the new release and doc") +print("4. cd to trunk and build : mvn clean install") +print("5. git add the new files, commit and git push") http://git-wip-us.apache.org/repos/asf/falcon/blob/3c297389/pom.template ---------------------------------------------------------------------- diff --git a/pom.template b/pom.template new file mode 100644 index 0000000..10913bf --- /dev/null +++ b/pom.template @@ -0,0 +1,66 @@ + + + + 4.0.0 + + org.apache.falcon + falcon-website-releases + 0.2 + + falcon-website-${branch} + ${branch} + pom + + Apache Falcon - Documentation v${branch} + + + + + org.apache.maven.plugins + maven-site-plugin + 3.3 + + + org.apache.maven.doxia + doxia-module-twiki + 1.3 + + + org.apache.maven.wagon + wagon-ssh-external + 2.6 + + + + + + site + + prepare-package + + + + ../../../site/${branch} + + + + + +