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