From 3b2218a8046fdee75b9e238ef1a3c39938af2ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 6 Oct 2017 08:01:37 +0200 Subject: [PATCH 1/2] Fix the documentation generation --- travis/doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/doc.sh b/travis/doc.sh index bfd6d8df47..882a1519f1 100755 --- a/travis/doc.sh +++ b/travis/doc.sh @@ -1,6 +1,6 @@ #!/bin/bash -ex -./docker-run make -f travis.mk doc +./docker-run make doc DOC=false BRANCH=2.1 From f9dd0782f36ad8dab47b220939ef61fb267b1c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 6 Oct 2017 10:34:34 +0200 Subject: [PATCH 2/2] Removes non well working docker-get --- .travis.yml | 6 +---- travis/docker-get | 62 ----------------------------------------------- 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100755 travis/docker-get diff --git a/.travis.yml b/.travis.yml index 1471fc13cd..c41f0729d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,11 +41,7 @@ before_install: echo "token =" >> ~/.transifexrc fi - mkdir /tmp/travis -- > - travis/docker-get - --tag camptocamp/geomapfish-build-dev:latest - --folder docker/build - --paths docker/build +- docker build --tag camptocamp/geomapfish-build-dev:latest docker/build - docker tag camptocamp/geomapfish-build-dev:latest camptocamp/geomapfish-build-dev:2.3 - | [[ `./docker-run id` =~ uid=[0-9]+\(travis\)\ gid=[0-9]+\(geomapfish\)\ groups=[0-9]+\(geomapfish\) ]] diff --git a/travis/docker-get b/travis/docker-get deleted file mode 100755 index cf162485c2..0000000000 --- a/travis/docker-get +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -# Copyright (c) 2017, Camptocamp SA -# All rights reserved. - -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: - -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. - -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# The views and conclusions contained in the software and documentation are those -# of the authors and should not be interpreted as representing official policies, -# either expressed or implied, of the FreeBSD Project. - -import os -import argparse -import subprocess - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("--tag", required=True) - parser.add_argument("--folder", required=True) - parser.add_argument("--rules", nargs="+") - parser.add_argument("--paths", nargs="+", required=True) - args = parser.parse_args() - - subprocess.check_output(["git", "fetch", "origin", "master:master"]) - files = [] - for path in args.paths: - diff = subprocess.check_output(["git", "diff", "--name-only", "master", "--", path]).decode("utf-8").strip() - files += [] if diff == "" else [ - l.strip() - for l in diff.split("\n") - ] - if len(files) == 0 and os.environ.get("TRAVIS_BRANCH") != "master": - subprocess.check_call(["docker", "pull", args.tag]) - else: - if args.rules is not None: - subprocess.check_call(["./docker-run", "make"] + args.rules) - subprocess.check_call([ - "docker", "build", "--tag", args.tag, args.folder - ]) - -if __name__ == "__main__": - main()