Koha Test Wiki MW Canasta on Koha Portainer
Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.
For the current Koha Wiki, visit https://wiki.koha-community.org .Using Travis CI to build and release simple plugins
Jump to navigation
Jump to search
Building and deploying simple plugins using Travis CI
There's a generic build mechanism described in another guide. This guide only works for REST API plugins and other plugins that don't serve static files to the user.
This mechanism uses the [CI built-in GitHub release system].
- Browse to https://travis-ci.org/ and connect your GitHub account to Travis CI.
- Set up Travis releases using the command line [client]: `travis setup releases`
- This will create a .travis.yml with an encrypted secret. Copy the file to a safe place.
- You will need to copy the following files from the REST DI plugin (replace .travis.yml created by the above step with this version):
- .travis.yml
- build.sh
- Edit .travis.yml and change the secret to your own (from the file created by `travis setup releases`).
- Edit build.sh and change PM_FILE and RELEASE_FILE to those matching your plugin.
- In your pm file:
- Replace the actual version with "{VERSION}", like so: our $VERSION = "{VERSION}";
- Change the date_updated to "1900-01-01", like so: date_updated => "1900-01-01",
- Commit the new files and changes to your module file.
- Tag the latest commit with a version tag such as v1.0.0: `git tag -a v1.0.0 -m "Release v1.0.0"`
- Push the commits and tags to GitHub (adjust as necessary): `git push --tags origin master`
- Wait a bit, within a minute or so you should see a build kick off on https://travis-ci.org/
- Once it has completed, check the releases page for your plugin on GitHub, you should now see a shiny new release!
Note that by default only the master branch is released. Adjust .travis.yml as necessary.
Any commit that isn't tagged will be built but not released. Thus it's safe to commit and push changes without accidentally creating a release.