From ea917c470ea228a5d60cd62f0cb253265e8da5f6 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 19 Dec 2018 04:47:48 -0600 Subject: [PATCH] attempt to add changelog and license to doc in CI built --- .gitlab-ci.yml | 4 +++- doc/documentation_importer.py | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 084c09e..61f48ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,10 +5,12 @@ production: script: - pip install --upgrade pip - pip install --upgrade -r requirements.txt + - copy changelog.md doc\changelog.md - cd doc - python documentation_importer.py - cd ..\src - python ..\doc\generator.py + - copy ..\license.txt documentation\license.txt - python setup.py py2exe - cd .. - cd scripts @@ -16,7 +18,7 @@ production: - cd .. - move src\socializer.zip socializer.zip only: - - tags + - master artifacts: paths: - socializer.zip diff --git a/doc/documentation_importer.py b/doc/documentation_importer.py index bd1a2f3..c00fd42 100644 --- a/doc/documentation_importer.py +++ b/doc/documentation_importer.py @@ -2,7 +2,7 @@ """ This script converts the hold documentation (saved in markdown files) in a python file with a list of strings to translate it using gettext.""" def prepare_documentation_in_file(fileSource, fileDest): - """ This takes documentation written in a markdown file and put all the contents in a python file, to create a internationalized documentation. + """ This takes documentation written in a markdown file and put all the contents in a python file, to create a translatable documentation. @fileSource str: A markdown(.md) file. @fileDest str: A file where this will put the new strings""" @@ -18,11 +18,10 @@ def prepare_documentation_in_file(fileSource, fileDest): newvar = "_(u\"\"\"%s\"\"\"),\n" % (i[:-1]) else: newvar = "_(u\"\"\"%s\"\"\"),\n" % (i) -# print i[-1:] f2.write(newvar) f1.close() f2.write("]") f2.close() - -prepare_documentation_in_file("manual.md", "strings.py") \ No newline at end of file +prepare_documentation_in_file("manual.md", "strings.py") +prepare_documentation_in_file("changelog.md", "changelog.py") \ No newline at end of file