mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-15 00:01:23 +00:00
Add date and time to u-os version number
This commit is contained in:
@@ -72,13 +72,16 @@ jobs:
|
||||
- name: Create Weidmueller u-OS app
|
||||
id: create_u-os-app
|
||||
run: |
|
||||
# uc-aom-packager accept only version that has to be greater than the previous one. Lets use the datetime to ensure that.
|
||||
DATETIME=$(date "+%Y%m%d%H%M%S")
|
||||
|
||||
# uc-aom-packager allow only decimal numbers as version number for an unkonwn reason
|
||||
# see https://github.com/weidmueller/uc-addon/blob/main/uc-manifest.schema-doc.md#version)
|
||||
# So lets convert the git hash into a decimal value
|
||||
GIT_HASH_DECIMAL=$((16#$GIT_HASH))
|
||||
|
||||
# Create app version
|
||||
APP_VERSION=$OPENWRT_VERSION-$GIT_HASH_DECIMAL
|
||||
APP_VERSION=$OPENWRT_VERSION.DATETIME-$GIT_HASH_DECIMAL
|
||||
|
||||
echo "***** Create manifest from template *****"
|
||||
mv u-os-app/manifest.json.template u-os-app/manifest.json
|
||||
@@ -86,6 +89,7 @@ jobs:
|
||||
cat u-os-app/manifest.json | grep version
|
||||
|
||||
echo "***** Run uc-aom-packager to create the u-OS app *****"
|
||||
# uc-aom-packager accepts only multiarch images. "--build-arg BUILDKIT_MULTI_PLATFORM=1" has to set to ensure that.
|
||||
docker run --rm --network=host --pull=always \
|
||||
--mount src=$(pwd)/u-os-app,target=/tmp/u-os-app-openwrt,type=bind wmucdev.azurecr.io/u-control/uc-aom-packager:0 \
|
||||
uc-aom-packager push \
|
||||
|
||||
Reference in New Issue
Block a user