diff --git a/lib b/lib index 3268017..18a6757 100644 --- a/lib +++ b/lib @@ -8,6 +8,8 @@ function create-archive(){ } function set-variables(){ + RELEASE=$(echo $DRONE_COMMIT_MESSAGE | tr -d '\n')-$DRONE_BRANCH + echo "$RELEASE" envsubst < module.json.template > ./module.json cat ./module.json } diff --git a/module.json.template b/module.json.template index c9682a3..94d98c3 100644 --- a/module.json.template +++ b/module.json.template @@ -8,7 +8,7 @@ "name": "leego neit" } ], - "version": "${DRONE_COMMIT_MESSAGE}-${DRONE_BRANCH}", + "version": "$RELEASE", "minimumCoreVersion": "9", "compatibility": { "minimum": "9", @@ -16,8 +16,8 @@ "maximum": "10" }, "url": "${DRONE_REPO_LINK}", - "manifest": "${DRONE_REPO_LINK}/releases/download/${DRONE_COMMIT_MESSAGE}-${DRONE_BRANCH}/module.json", - "download": "${DRONE_REPO_LINK}/releases/download/${DRONE_COMMIT_MESSAGE}-${DRONE_BRANCH}/module.zip", + "manifest": "${DRONE_REPO_LINK}/releases/download/$RELEASE/module.json", + "download": "${DRONE_REPO_LINK}/releases/download/$RELEASE/module.zip", "packs": [ { "name": "sc-items",