1
0

Update echos

This commit is contained in:
Kyle M Hall 2020-04-16 09:38:32 -04:00
parent 8ae204c7f9
commit bd74b67099
2 changed files with 10 additions and 8 deletions

View File

@ -34,7 +34,7 @@ The name of the built kpz file
with: with:
release-version: ${{ steps.semvers.outputs.v_patch }} release-version: ${{ steps.semvers.outputs.v_patch }}
release-name: ${{ steps.myvars.outputs.GITHUB_REPO }} release-name: ${{ steps.myvars.outputs.GITHUB_REPO }}
minimum-version: ${{ steps.myvars.outputs.MINIMUM_VERSION }} minimum-version: ${{ steps.koha-version-oldstable.outputs.version-major-minor }}
``` ```
Take a look at https://github.com/bywatersolutions/koha-plugin-kitchen-sink/blob/master/.github/workflows/main.yml for a real world usage. Take a look at https://github.com/bywatersolutions/koha-plugin-kitchen-sink/blob/master/.github/workflows/main.yml for a real world usage.

View File

@ -4,8 +4,15 @@ PLUGIN_VERSION=$1
PLUGIN_NAME=$2 PLUGIN_NAME=$2
MINIMUM_VERSION=$3 MINIMUM_VERSION=$3
echo "PLUGIN VERSION: $PLUGIN_VERSION"
echo "PLUGIN NAME: $PLUGIN_NAME"
echo "MINIMUM VERSION: $MINIMUM_VERSION"
RELEASE_FILENAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.kpz" RELEASE_FILENAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.kpz"
echo "RELEASE FILENAME: $RELEASE_FILENAME"
TODAY_ISO=$(date '+%Y-%m-%d') TODAY_ISO=$(date '+%Y-%m-%d')
echo "TODAY ISO: $TODAY_ISO"
cd /github/workspace cd /github/workspace
mkdir dist mkdir dist
@ -13,6 +20,7 @@ cp -r Koha dist/.
cd dist cd dist
PLUGIN_MODULE=$(find . -regex '\./Koha/Plugin/.*[A-Za-z]*\.pm$' | sed '1q;d') PLUGIN_MODULE=$(find . -regex '\./Koha/Plugin/.*[A-Za-z]*\.pm$' | sed '1q;d')
echo "PLUGIN MODULE: $PLUGIN_MODULE"
META_YML=$(find . -regex '\./Koha/Plugin/.*[A-Za-z]*/META\.yml$' | sed '1q;d') META_YML=$(find . -regex '\./Koha/Plugin/.*[A-Za-z]*/META\.yml$' | sed '1q;d')
sed -i -e "s/{VERSION}/${PLUGIN_VERSION}/g" ${PLUGIN_MODULE} sed -i -e "s/{VERSION}/${PLUGIN_VERSION}/g" ${PLUGIN_MODULE}
@ -27,14 +35,8 @@ if [ -f "$META_YML" ]; then
fi fi
zip -r ../${RELEASE_FILENAME} ./Koha zip -r ../${RELEASE_FILENAME} ./Koha
cp ${META_YML} .. # Copy munged META.yml to the root directory
cd .. cd ..
rm -rf dist rm -rf dist
echo "MINIMUM VERSION: $MINIMUM_VERSION"
echo "PLUGIN VERSION: $PLUGIN_VERSION"
echo "PLUGIN NAME: $PLUGIN_NAME"
echo "TODAY ISO: $TODAY_ISO"
echo "RELEASE FILENAME: $RELEASE_FILENAME"
echo "PLUGIN MODULE: $PLUGIN_MODULE"
echo ::set-output name=filename::${RELEASE_FILENAME} echo ::set-output name=filename::${RELEASE_FILENAME}