From 6c98481cd748da7f8457c91a5864adeda35ce84d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 16 Apr 2020 13:43:23 -0400 Subject: [PATCH] Add changelog, ability to copy plugin changelog and readme files into plugin data dir before zipping --- CHANGELOG.md | 19 +++++++++++++++++++ entrypoint.sh | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..46ec717 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0] - 2020-04-16 +### Added +- This changelog +- If README.md is present in the root directory of the plugin, it will be copied into the plugin's data directory before create the kpz file +- The same as above, but for CHANGELOG.md as well + +### Changed +- Nothing + +### Removed +- Nothing diff --git a/entrypoint.sh b/entrypoint.sh index b486c2d..d416c07 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -34,6 +34,16 @@ if [ -f "$META_YML" ]; then cat $META_YML fi +PLUGIN_DIR=${PLUGIN_MODULE::-3} + +if [ -f "CHANGELOG.md" ]; then + cp CHANGELOG.md "$PLUGIN_DIR/CHANGELOG.md" +fi + +if [ -f "README.md" ]; then + cp README.md "$PLUGIN_DIR/README.md" +fi + zip -r ../${RELEASE_FILENAME} ./Koha cp ${META_YML} .. # Copy munged META.yml to the root directory cd ..