added dockerfile

This commit is contained in:
Pavel Dmitriev 2022-05-03 00:25:03 +03:00
parent fa26e7f2e7
commit 8e93dce6e6
2 changed files with 11 additions and 5 deletions

4
Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM alpine
RUN apk add curl git openssh jq bash zip
COPY pack.sh /usr/bin/pack
WORKDIR /usr/src

12
pack.sh
View File

@ -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