Skip to content

Commit

Permalink
Add deploy.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
emta001 committed Oct 1, 2021
1 parent fe2dba0 commit e339fba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Koha/Plugin/Fi/KohaSuomi/OKMStats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use Koha::Plugins;
use Koha::Plugin::Fi::KohaSuomi::OKMStats::Modules::OPLIB::OKM;

## Here we set our plugin version
our $VERSION = "1.0";
our $VERSION = "1.0.0";

## Here is our metadata, some keys are required, some are optional
our $metadata = {
Expand Down
22 changes: 22 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

PM_FILE="Koha/Plugin/Fi/KohaSuomi/OKMStats.pm"
VERSION=`grep -oE "\-?[0-9]+\.[0-9]+\.[0-9]" $PM_FILE | head -1`
MINVERSION=`grep -oE "\-?[0-9]+\.[0-9][0-9]" $PM_FILE | head -1`
RELEASE_FILE="koha-plugin-broadcast-biblios-v${VERSION}.kpz"
VERSIONTAG=`git tag -l "v${VERSION}-koha-$MINVERSION"`

if [ $VERSIONTAG ]; then
echo "Release version already exists!"
exit 1
fi

rm $RELEASE_FILE

echo "Building release package ${RELEASE_FILE}"

zip -r $RELEASE_FILE ./Koha

echo "Creating tag v${VERSION}-koha-$MINVERSION"

git tag -a "v${VERSION}-koha-$MINVERSION" -m "Release ${VERSION}"

0 comments on commit e339fba

Please sign in to comment.