Skip to content

Commit e0042f3

Browse files
committed
fix: proper file replacements
1 parent e0875e7 commit e0042f3

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,17 @@ jobs:
205205
export NODEJS_FILENAME=${{ steps.download-nodejs.outputs.NODEJS_FILENAME }}
206206
export NODEJS_SHA256=${{ steps.download-nodejs.outputs.NODEJS_SHA256 }}
207207
export NGHTTP3_FILENAME=${{ steps.download-nghttp3.outputs.NGHTTP3_FILENAME }}
208-
export NGHTTP3_SHA256=${{ steps.download-nghttp3.outputs.NGHTTP3_SHA256 }}
208+
if [ -z "${API_VERSION}" ] ||
209+
[ -z "${API_MD5}" ] ||
210+
[ -z "${API_SHA256}" ] ||
211+
[ -z "${NODEJS_FILENAME}" ] ||
212+
[ -z "${NODEJS_SHA256}" ] ||
213+
[ -z "${NGHTTP3_FILENAME}" ] ||
214+
[ -z "${NGHTTP3_SHA256}" ]; then
215+
echo "Error: One or more required variables are not set."
216+
exit 1
217+
fi
218+
209219
bash ./pkg_build.sh s ${{github.event.pull_request.number}}
210220
bash ./pkg_build.sh p
211221
- name: Upload binary txz and plg to Github artifacts

plugin/source/dynamix.unraid.net/pkg_build.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ cd "${DIR}" || exit 1
5151
PLUGIN_URL="https://stable.dl.unraid.net/unraid-api/\&name;.plg"
5252
MAIN_TXZ="https://stable.dl.unraid.net/unraid-api/${plugin}-${version}.txz"
5353
API_TGZ="https://stable.dl.unraid.net/unraid-api/unraid-api-${API_VERSION}.tgz"
54-
NODE_TGZ="https://stable.dl.unraid.net/unraid-api/${NODEJS_FILENAME}"
54+
NODE_TXZ="https://stable.dl.unraid.net/unraid-api/${NODEJS_FILENAME}"
5555
NGHTTP3_TGZ="https://stable.dl.unraid.net/unraid-api/${NGHTTP3_FILENAME}"
5656
# Check if PR is set, use a different path if so
5757
if [[ -n "${PR}" ]]; then
5858
MAIN_TXZ="https://preview.dl.unraid.net/unraid-api/pr/${PR}/${plugin}-${version}.txz"
5959
API_TGZ="https://preview.dl.unraid.net/unraid-api/pr/${PR}/unraid-api-${API_VERSION}.tgz"
6060
PLUGIN_URL="https://preview.dl.unraid.net/unraid-api/pr/${PR}/${plugin}.plg"
61-
NODE_TGZ="https://preview.dl.unraid.net/unraid-api/pr/${PR}/${NODEJS_FILENAME}"
61+
NODE_TXZ="https://preview.dl.unraid.net/unraid-api/pr/${PR}/${NODEJS_FILENAME}"
6262
NGHTTP3_TGZ="https://preview.dl.unraid.net/unraid-api/pr/${PR}/${NGHTTP3_FILENAME}"
6363
elif [[ "${env}" == "staging" ]]; then
6464
PLUGIN_URL="https://preview.dl.unraid.net/unraid-api/\&name;.plg"
6565
MAIN_TXZ="https://preview.dl.unraid.net/unraid-api/${plugin}-${version}.txz"
6666
API_TGZ="https://preview.dl.unraid.net/unraid-api/unraid-api-${API_VERSION}.tgz"
67-
NODE_TGZ="https://preview.dl.unraid.net/unraid-api/${NODEJS_FILENAME}"
67+
NODE_TXZ="https://preview.dl.unraid.net/unraid-api/${NODEJS_FILENAME}"
6868
NGHTTP3_TGZ="https://preview.dl.unraid.net/unraid-api/${NGHTTP3_FILENAME}"
6969
fi
7070

@@ -80,12 +80,12 @@ sed -i -E "s#(ENTITY MAIN_TXZ\s*)\".*\"#\1\"${MAIN_TXZ}\"#g" "${plgfile}"
8080
sed -i -E "s#(ENTITY API_TGZ\s*)\".*\"#\1\"${API_TGZ}\"#g" "${plgfile}"
8181

8282
# update node versions
83-
sed -i -E "s#(ENTITY NODE\s*)\".*\"#\1\"${NODEJS_FILENAME}\"#g" "${plgfile}"
84-
sed -i -E "s#(ENTITY NODE_SHA256\s*)\".*\"#\1\"${NODEJS_SHA256}\"#g" "${plgfile}"
85-
sed -i -E "s#(ENTITY NODE_TXZ\s*)\".*\"#\1\"${NODE_TGZ}\"#g" "${plgfile}"
83+
sed -i -E "s#(ENTITY NODEJS_FILENAME\s*)\".*\"#\1\"${NODEJS_FILENAME}\"#g" "${plgfile}"
84+
sed -i -E "s#(ENTITY NODEJS_SHA256\s*)\".*\"#\1\"${NODEJS_SHA256}\"#g" "${plgfile}"
85+
sed -i -E "s#(ENTITY NODE_TXZ\s*)\".*\"#\1\"${NODE_TXZ}\"#g" "${plgfile}"
8686

8787
# update nghttp3 versions
88-
sed -i -E "s#(ENTITY NGHTTP3\s*)\".*\"#\1\"${NGHTTP3_FILENAME}\"#g" "${plgfile}"
88+
sed -i -E "s#(ENTITY NGHTTP3_FILENAME\s*)\".*\"#\1\"${NGHTTP3_FILENAME}\"#g" "${plgfile}"
8989
sed -i -E "s#(ENTITY NGHTTP3_SHA256\s*)\".*\"#\1\"${NGHTTP3_SHA256}\"#g" "${plgfile}"
9090
sed -i -E "s#(ENTITY NGHTTP3_TXZ\s*)\".*\"#\1\"${NGHTTP3_TGZ}\"#g" "${plgfile}"
9191

0 commit comments

Comments
 (0)