Travis CI: Building with Latest Highlight Release
Ciao André,
I need to integrate Highlight in the Travis CI build tests for a documentation repository that uses Highlight in the Asciidoctor toolchain:
https://github.com/tajmone/hugo-book
I've looked at the official documentation both on the Highlight website as well as in the INSTALL document inside the repository, but most of the Linux packages mentioned therein are either no longer available or are very old versions (although the website and INSTALL document mention different sources, the information is pretty outdated on both).
I guess that the best solution will be cloning and compiling Highlight CLI directly on Travis CI.
My main question is:
- How can I enforce cloning always the latest stable release?
Using master
branch doesn't seem a viable solution, for it contains development commits too.
Using tags would tie me to a specific version, so I must find a way to retrieve the last stable version number, and maybe assign it to an env var so that I can manipulate the installation script to clone that specific tag.
- Which would be best way to go about this?
- Is there an easy way to query GitLab for the latest release tag?
Would adding to the repository a text file containing the latest version help? i.e. so that a batch script could fetch it and assign its contents to an env var?
- Any general advise on how to go about my Travis CI project setup?
(I only need the CLI version of Highlight, but it must be available system wide, so Asciidoctor can invoke it from the Highlight Extension).
Thanks