From 8e93dce6e6821dae1d59579b6104198d166b3fa5 Mon Sep 17 00:00:00 2001 From: Pavel Dmitriev Date: Tue, 3 May 2022 00:25:03 +0300 Subject: [PATCH] added dockerfile --- Dockerfile | 4 ++++ pack.sh | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d65260 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM alpine +RUN apk add curl git openssh jq bash zip +COPY pack.sh /usr/bin/pack +WORKDIR /usr/src diff --git a/pack.sh b/pack.sh index 6114405..ab39ecd 100755 --- a/pack.sh +++ b/pack.sh @@ -27,15 +27,17 @@ echo "{ \"name\":\"${mod_name}\", \"version\":\"${mod_version}\", \"title\":\"${mod_title}\", - \"hash\":\"${md5}\", -} -" > src/module.json + \"hash\":\"${md5}\" +}" > src/module.json zip_name="mod_$mod_name-v$mod_version.zip" rm -f mod_*.zip cd src zip -r ../$zip_name . -#cd - -#rm -rf src +cd - +rm -rf src +curl --user ${REG_LOGIN}:${REG_PASSWORD} \ + --upload-file ${zip_name} \ + https://mxfox.ru/api/packages/${REG_REPOS}/generic/${mod_name}/${mod_version}/${mod_name}.zip