Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ndw committed Jul 13, 2020
1 parent 8e33453 commit 8912526
Show file tree
Hide file tree
Showing 1,391 changed files with 208,565 additions and 2 deletions.
140 changes: 140 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
version: 2
jobs:

# FIXME: Work out how to use YAML features or “Orbs” to reduce the
# redundancy in this configuration. The ‘testbuild’ and ‘deploybuild’
# jobs are essentially the same. They only differ in the gradle target.

testbuild:
machine:
image: ubuntu-1604:202004-01

working_directory: ~/repo

environment:
JVM_OPTS: -Xmx8g
TERM: dumb

steps:
- add_ssh_keys:
fingerprints:
- "3b:70:31:86:74:31:25:e6:18:aa:ec:1b:01:d9:2d:76"

- run: python3 -m pip install pygments==2.6.1 click

- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: openssl aes-256-cbc -d -k $SAXPASSPHRASE -in tools/saxon.enc | tar zxf -

- run: ./gradlew dependencies

- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}

- run: ./gradlew website

- run: rm -rf lib

- persist_to_workspace:
root: build
paths:
- distributions
- website

- store_artifacts:
path: build/website

deploybuild:
machine:
image: ubuntu-1604:202004-01

working_directory: ~/repo

environment:
JVM_OPTS: -Xmx8g
TERM: dumb

steps:
- add_ssh_keys:
fingerprints:
- "3b:70:31:86:74:31:25:e6:18:aa:ec:1b:01:d9:2d:76"

- run: python3 -m pip install pygments==2.6.1 click

- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: openssl aes-256-cbc -d -k $SAXPASSPHRASE -in tools/saxon.enc | tar zxf -

- run: ./gradlew dependencies

- save_cache:
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}

- run: ./gradlew dist

- run: rm -rf lib

- persist_to_workspace:
root: build
paths:
- distributions
- website

- store_artifacts:
path: build/website

- run: ./.circleci/publish-website.sh

publish-github-release:
docker:
- image: cibuilds/github:0.10
steps:
- attach_workspace:
at: ./artifacts
- run: ls -lR
- run:
name: "Publish Release on GitHub"
command: |
VERSION=${CIRCLE_TAG}
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${VERSION} ./artifacts/distributions/
workflows:
version: 2
check:
jobs:
- testbuild:
filters:
branches:
ignore: gh-pages
deploy:
jobs:
- deploybuild:
filters:
branches:
ignore: /.*/
tags:
only: /.+/
- publish-github-release:
requires:
- deploybuild
filters:
branches:
ignore: /.*/
tags:
only: /.+/
43 changes: 43 additions & 0 deletions .circleci/publish-website.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

if [[ -v CIRCLE_TAG ]]; then
echo "Deploying website updates for $CIRCLE_TAG"
else
echo "Website updates are not published for untagged builds"
exit
fi

if [ `git branch -r | grep "origin/gh-pages" | wc -l` = 0 ]; then
echo "No gh-pages branch for publication"
exit
fi

if [ `set | grep GIT_EMAIL | wc -l` = 0 -o `set | grep GIT_USER | wc -l` = 0 ]; then
echo "No identity configured with GIT_USER/GIT_EMAIL"
exit
fi

git config --global user.email $GIT_EMAIL
git config --global user.name $GIT_USER

# Remember the SHA of the current build.
SHA=$(git rev-parse --verify HEAD)

# Save the website files
cd build/website
tar cf - . | gzip > /tmp/website.$$.tar.gz
cd ../..

# Switch to the gh-pages branch
git checkout --track origin/gh-pages
git fetch origin
git rebase origin/gh-pages

# Unpack the website files
tar zxf /tmp/website.$$.tar.gz
rm /tmp/website.$$.tar.gz

# Push the changes back to the repo
git add .
git commit -m "Deploy gh-pages for ${CIRCLE_PROJECT_USERNAME}: ${SHA}"
git push -q origin HEAD
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.gradle/
/.idea/
/build/
/lib/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Norman Walsh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 9 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* DocBook xslTNG Stylesheets
#+TITLE: DocBook xsltNG README

Coming soon…
Build status:
[[https://circleci.com/gh/ndw/docbook-xsltNG.svg?style=svg&circle-token=fff3d12b38fab0fbce5b9f431f80d1b44f1b5553]]

Hello. You’ve found this repository during it’s “soft opening.” It’s
public and it should all work, but I haven’t made any announcements
about it.

It’s not a secret, but [[https://www.merriam-webster.com/dictionary/keep+(something)+under+one's+hat][keep it under your hat]], ok?
Loading

0 comments on commit 8912526

Please sign in to comment.