Skip to content

Instantly share code, notes, and snippets.

@retrage
Last active October 9, 2017 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save retrage/dc0980ec4c79b33cd522c4f4f4b82900 to your computer and use it in GitHub Desktop.
Save retrage/dc0980ec4c79b33cd522c4f4f4b82900 to your computer and use it in GitHub Desktop.
config.yml for Latex on Circle CI 2.0
version: 2
jobs:
build:
docker:
- image: paperist/alpine-texlive-ja
steps:
- run:
name: Installing dependancies
command: |
apk add --update git patch curl
apk add --update ca-certificates openssl && update-ca-certificates
tlmgr install ulem latexdiff
- checkout
- run: cp .latexmkrc ~/.latexmkrc
- run:
name: Generating current version
command: |
latexmk main.tex;
mkdir /tmp/artifacts;
cp main.pdf /tmp/artifacts/
- run:
name: Generating diff
command: |
latexdiff-vc -e utf8 --git -r HEAD^ -r HEAD main.tex;
latexmk main-diffHEAD^-HEAD.tex;
cp main-diffHEAD^-HEAD.pdf /tmp/artifacts/
- run:
name: Uploading artifacts
command: |
curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/downloads" --form files=@"/tmp/artifacts/temp.pdf";
curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/downloads" --form files=@"/tmp/artifacts/temp-diffHEAD^-HEAD.pdf";
- store_artifacts:
path: /tmp/artifacts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment