-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
277 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Problem | ||
|
||
|
||
## Expected Behaviour | ||
|
||
|
||
## See Also | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fixes # . | ||
|
||
Changes proposed in this pull request: | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,6 @@ build/* | |
build-20??????/* | ||
test-output/* | ||
tmp/ | ||
|
||
*.zip | ||
*.tar.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
language: python | ||
python: | ||
- '3.6' | ||
|
||
env: | ||
global: | ||
- VERSION=$(git describe) | ||
|
||
before_install: | ||
- echo "TRAVIS_TAG=$TRAVIS_TAG" | ||
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH" | ||
- echo "TRAVIS_COMMIT=$TRAVIS_COMMIT" | ||
- echo "TRAVIS_COMMIT_MESSAGE=$TRAVIS_COMMIT_MESSAGE" | ||
- echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION" | ||
|
||
install: | ||
- sudo apt-get update -q | ||
- sudo apt-get install xsltproc | ||
- sudo apt-get install libsaxon-java libxml-commons-resolver1.1-java libsaxon-java libxerces2-java | ||
- sudo apt-get install trang jing | ||
- sudo apt-get install python3 python3-lxml | ||
|
||
script: | ||
- ./bin/buildbook.py -v --archive | ||
|
||
before_deploy: | ||
- git config --local user.name "Travis CI" | ||
- git config --local user.email "[email protected]" | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: e3VKJ/VJiwrE+n/g1gITroGq/1II+vgp2A89xjtKmzwfIALUm098iTBXAGzEhzWeg+aP4R0vBNk/Ud7H2Ehxg7iJfYx7Vo16EJGpeo8maXakaTtXBGEPXpxW1UGQ35DZ0uNsJLEEMRE8jSjCe9sQDRIkUEfK58uAg1+I0T/C1Z26xlfB9luROiyOj1dNvF6V90vBybn5SmHVgAomRSPbFtVYXyr60aEb6S/eOOJD84kRvIPrrdY48DiiX+1LX7BTkdcP+wHCi6XHNN4pWT48h1BmP2SCPJvMqDIfak3d7abyk+oUdPG/dopicVWftjH+6yedHaPkdQyxLCRUxpzyUKtHxHSTpEEJ9Foa89JSTdZocAUBEFhFshESvVMBxGuLDdng+2lWgd1QnxzmzOQTmUYVhi5NKttfrrXmzqE+YnTmgQd5wJQWJLbkvZENSFmrE+fxZkeEHaiC3tSvR0Q3sIjZY87gAE1HWsB1r9Bu97k96rnoTWaHCGxRJ4smRPS0PY7gTAfHFntmyCYtKi7H0NAAZRIxkbP156WTFGQgkK8zQqzLAPCrJ4XzQokoiqDMK3jZOMcaOg5RIXsu+8/McjQ33511vshl4MdYZDbnkWhaSuEQG6+Prnx0/d9ziJSHRETQLwxjba/u5XD7ryVc7gVXau0r4l7Yh3ON3YHqF/w= | ||
file: | ||
- DBCookBook-$VERSION-html.tar.bz2 | ||
- DBCookBook-$VERSION-html.zip | ||
skip_cleanup: true | ||
on: | ||
branch: master | ||
tags: true | ||
repo: tomschr/dbcookbook | ||
|
||
notifications: | ||
email: | ||
on_success: change | ||
on_failure: change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
------------------------------------------------------------------- | ||
Sat Mar 10 23:25:00 UTC 2018 - [email protected] | ||
|
||
Version 0.7.3 Work on infrastructure: | ||
|
||
* Create issue template (#20) | ||
* First draft of .travis.yml (#18 and #22) | ||
* Create archives (#16) | ||
* Move to GitHub (#15) | ||
* Add horizontal scrollbar for HTML program listings (#4) | ||
* Fix XPath in structure/remove-blocks-in-para/move-blocks-outof-para.xsl (#1) | ||
|
||
------------------------------------------------------------------- | ||
Sun May 21 22:08:00 UTC 2017 - [email protected] | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cc-by-nc-sa-3.0-de.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,11 @@ project=doccookbook | |
site=frs.sourceforge.net | ||
path=/home/frs/project/${project} | ||
|
||
[Archive] | ||
zipfile=DBCookBook-@[email protected] | ||
tarfile=DBCookBook-@[email protected] | ||
root=DBCookBook-@VERSION@ | ||
|
||
[XSLT1] | ||
dir=${Common:basexslt1} | ||
commondir=${dir}common/ | ||
|
@@ -58,4 +63,4 @@ cssdir=${dir}css/ | |
jsdir=${Common:origxslt2dir}js/ | ||
|
||
|
||
# EOF | ||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# | ||
|
||
from configparser import InterpolationMissingOptionError | ||
from pathlib import Path | ||
import os | ||
import shlex | ||
import subprocess | ||
import tarfile | ||
import zipfile | ||
|
||
try: | ||
import zlib | ||
compression = zipfile.ZIP_DEFLATED | ||
except: | ||
compression = zipfile.ZIP_STORED | ||
|
||
from .config import config | ||
from .log import trace, logger | ||
|
||
|
||
def createzip(parser, args=None): | ||
if args is not None and not args.archive: | ||
logger.info("Skipping compressed archive creation") | ||
return | ||
|
||
# TODO: maybe there is a better method: | ||
version = subprocess.check_output(shlex.split("git describe")) | ||
version = version.decode("utf-8").strip() | ||
|
||
logger.info("** Creating Archives **") | ||
try: | ||
zipfilename = config.get('Archive', 'zipfile').replace("@VERSION@", version) | ||
tarfilename = config.get('Archive', 'tarfile').replace("@VERSION@", version) | ||
root = os.path.normpath(config.get('Archive', 'root')).replace("@VERSION@", version) | ||
htmldir = os.path.normpath(config.get('Common', 'htmldir')) | ||
except InterpolationMissingOptionError as error: | ||
logger.warning(error) | ||
|
||
logger.info("Creating ZIP archive %r...", zipfilename) | ||
logger.info("Creating Tar archive %r...", tarfilename) | ||
logger.info("root=%r", root) | ||
logger.info("htmldir=%r", htmldir) | ||
|
||
MODES = {'.gz': 'w:gz', | ||
'.bz2': 'w:bz2', | ||
'.xz': 'w:xz'} | ||
writemode = MODES.get(os.path.splitext(tarfilename)[-1], 'w') | ||
logger.info("Using mode=%s for tar archive", writemode) | ||
|
||
with zipfile.ZipFile(zipfilename, mode="w", compression=compression) as zf, \ | ||
tarfile.open(tarfilename, mode=writemode, dereference=True) as tf: | ||
path = Path(htmldir) | ||
PATHS=('*.html', 'css/*', 'highlighter/*', 'js/*') | ||
for p in PATHS: | ||
for pp in path.glob(p): | ||
dest = root / pp.relative_to(htmldir) | ||
zf.write(str(pp), arcname=str(dest)) | ||
tf.add(str(pp), arcname=str(dest), recursive=False) | ||
logger.info("Adding %r...", str(dest)) | ||
|
||
PATHS=('examples/**/*', 'png/**/*', ) | ||
for p in PATHS: | ||
for pp in path.rglob(p): | ||
dest = root / pp.relative_to(htmldir) | ||
zf.write(str(pp), arcname=str(dest)) | ||
tf.add(str(pp), arcname=str(dest), recursive=False) | ||
logger.info("Adding %r...", str(dest)) | ||
|
||
logger.info("Successfully created archives") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.