Skip to content

Commit

Permalink
Try to add 0.17 thumbnail support
Browse files Browse the repository at this point in the history
  • Loading branch information
shanemadden committed Feb 26, 2019
1 parent e36ea83 commit f55e5b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ UPLOAD_RESULT=$(curl -b cookiejar.txt -c cookiejar.txt -s -F "file=@${NAME}_${TA
CHANGELOG=$(echo "${UPLOAD_RESULT}" | jq -r '.changelog' | tr "\t" " " | tr " " "+" )
INFO=$(echo "${UPLOAD_RESULT}" | jq -r '.info' | tr " " "+" | tr -d "\r\n" | tr -d "\t")
FILENAME=$(echo "${UPLOAD_RESULT}" | jq -r '.filename')
THUMBNAIL=$(echo "${UPLOAD_RESULT}" | jq -r '.thumbnail')

if [[ "${FILENAME}" == "null" ]] || [[ -z "${FILENAME}" ]]; then
echo "Upload failed"
Expand All @@ -71,6 +72,6 @@ fi
echo "Uploaded ${NAME}_${TAG}.zip to ${FILENAME}, submitting as new version"

# Post the form, completing the release
curl -b cookiejar.txt -c cookiejar.txt -s -X POST -d "file=&info_json=${INFO}&changelog=${CHANGELOG}&filename=${FILENAME}&file_size=${FILESIZE}" -H "Content-Type: application/x-www-form-urlencoded" -o /dev/null "https://mods.factorio.com/mod/${NAME}/downloads/edit"
curl -b cookiejar.txt -c cookiejar.txt -s -X POST -d "file=&info_json=${INFO}&changelog=${CHANGELOG}&filename=${FILENAME}&file_size=${FILESIZE}&thumbnail=${THUMBNAIL}" -H "Content-Type: application/x-www-form-urlencoded" -o /dev/null "https://mods.factorio.com/mod/${NAME}/downloads/edit"

echo "Completed"

0 comments on commit f55e5b8

Please sign in to comment.