Skip to content

Instantly share code, notes, and snippets.

@beevelop
Last active June 1, 2017 06:53
Show Gist options
  • Save beevelop/a6739d747a037f4c1aa9fb8e70eccd38 to your computer and use it in GitHub Desktop.
Save beevelop/a6739d747a037f4c1aa9fb8e70eccd38 to your computer and use it in GitHub Desktop.

Revisions

  1. beevelop revised this gist Jun 1, 2017. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Continuous Everything for LaTeX documents
    Uses the beevelop/latex Docker image and Travis to automatically attach PDF files to GitHub Releases.

    ## Release Management
    To enable awesome Changelogs use the npm package `release-it`
    ```sh
    npm i -g release-it

    release-it # does a patch release (v1.0.X)
    release-it minor # v1.X.0
    release-it major # vX.0.0
    ```

    ## Preview (on macOS)
    Use `preview.sh` to build and view the PDF file locally (macOS, Preview.app). Docker is required on the respective system in order to run the builds.
  2. beevelop revised this gist Jun 1, 2017. No changes.
  3. beevelop created this gist Jun 1, 2017.
    20 changes: 20 additions & 0 deletions .release.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@

    {
    "non-interactive": true,
    "force": false,
    "pkgFiles": [
    "package.json"
    ],
    "increment": "patch",
    "commitMessage": "Release v%s",
    "tagName": "v%s",
    "tagAnnotation": "Release v%s",
    "changelogCommand": "git log --pretty=format:'* %s (%h)' [REV_RANGE]",
    "requireCleanWorkingDir": true,
    "npm": {
    "publish": false
    },
    "github": {
    "release": true
    }
    }
    22 changes: 22 additions & 0 deletions .travis.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@

    sudo: required

    language: node_js

    services:
    - docker

    script:
    - docker pull beevelop/latex
    - cd tex
    - docker run --rm -e ENABLE_BIBER=true -e ENABLE_GLOSSARIES=true -e ENABLE_CLEANUP=true -v `pwd`:/mnt/src beevelop/latex main
    - ls -lah
    - cd ..

    deploy:
    - provider: releases
    api_key: "github-api-key"
    file: "tex/main.pdf"
    skip_cleanup: true
    on:
    tags: true
    5 changes: 5 additions & 0 deletions preview.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    #!/bin/bash

    docker build -t latex .
    docker run --rm -e ENABLE_BIBER=true -e ENABLE_GLOSSARIES=true -e ENABLE_CLEANUP=true -v `pwd`/tex:/mnt/src beevelop/latex main && \
    open -a /Applications/Preview.app tex/main.pdf