Add support for prepending Koha version to plugin version
This commit is contained in:
parent
b989ed8652
commit
bc804fb864
@ -13,6 +13,10 @@ The file will be in your GitHub workspace after the action is run.
|
|||||||
|
|
||||||
**Required** Name of plugin, should almost always be the repo name, e.g. `koha-plugin-kitchen-sink`
|
**Required** Name of plugin, should almost always be the repo name, e.g. `koha-plugin-kitchen-sink`
|
||||||
|
|
||||||
|
### `koha-version`
|
||||||
|
|
||||||
|
**Optional** Major and minor version of Koha. If this is passed in, it will be prepended to the plugin version
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
### `filename`
|
### `filename`
|
||||||
@ -28,6 +32,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 }}
|
||||||
|
koha-version: 19.11
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
||||||
|
@ -19,3 +19,4 @@ runs:
|
|||||||
args:
|
args:
|
||||||
- ${{ inputs.release-version }}
|
- ${{ inputs.release-version }}
|
||||||
- ${{ inputs.release-name }}
|
- ${{ inputs.release-name }}
|
||||||
|
- ${{ inputs.koha-version }}
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
|
|
||||||
PLUGIN_VERSION=$1
|
PLUGIN_VERSION=$1
|
||||||
PLUGIN_NAME=$2
|
PLUGIN_NAME=$2
|
||||||
|
KOHA_VERSION=$3
|
||||||
|
|
||||||
|
if [ -z "$KOHA_VERSION" ]
|
||||||
|
PLUGIN_VERSION="$KOHA_VERSION.$PLUGIN_VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
RELEASE_FILENAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.kpz"
|
RELEASE_FILENAME="${PLUGIN_NAME}-${PLUGIN_VERSION}.kpz"
|
||||||
TODAY_ISO=$(date '+%Y-%m-%d')
|
TODAY_ISO=$(date '+%Y-%m-%d')
|
||||||
@ -27,6 +32,7 @@ zip -r ../${RELEASE_FILENAME} ./Koha
|
|||||||
cd ..
|
cd ..
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|
||||||
|
echo "KOHA VERSION: $KOHA_VERSION"
|
||||||
echo "PLUGIN VERSION: $PLUGIN_VERSION"
|
echo "PLUGIN VERSION: $PLUGIN_VERSION"
|
||||||
echo "PLUGIN NAME: $PLUGIN_NAME"
|
echo "PLUGIN NAME: $PLUGIN_NAME"
|
||||||
echo "TODAY ISO: $TODAY_ISO"
|
echo "TODAY ISO: $TODAY_ISO"
|
||||||
|
Loading…
Reference in New Issue
Block a user