Commit fdcdd320 authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Release: fix format of sha256 files

parent 50f7ed50
...@@ -95,30 +95,30 @@ case "$1" in ...@@ -95,30 +95,30 @@ case "$1" in
if [[ ! -f ${JAR_FILE} ]]; then if [[ ! -f ${JAR_FILE} ]]; then
echo "ERROR: Missing JAR artifact: ${JAR_FILE}. Skipping uppload" echo "ERROR: Missing JAR artifact: ${JAR_FILE}. Skipping uppload"
missing_file=true missing_file=true
else else
result=`curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${JAR_FILE}" "$upload_url?name=sumaris-pod-$current.jar"` artifact_name="sumaris-pod-$current.jar"
result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${JAR_FILE}" "${upload_url}?name=${artifact_name}")
browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"` browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"`
JAR_SHA256=$(sha256sum "${JAR_FILE}") JAR_SHA256=$(sha256sum "${JAR_FILE}" | sed 's/ /\n/gi' | head -n 1)
echo " - $browser_download_url | SHA256 Checksum: ${JAR_SHA256}" echo " - $browser_download_url | SHA256: ${JAR_SHA256}"
echo "${JAR_SHA256}" > ${JAR_FILE}.sha256 echo "${JAR_SHA256} ${artifact_name}" > ${JAR_FILE}.sha256
result=`curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: text/plain' -T "${JAR_FILE}.sha256" "$upload_url?name=sumaris-pod-$current.jar.sha256"` result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: text/plain' -T "${JAR_FILE}.sha256" "${upload_url}?name=${artifact_name}.sha256")
fi fi
DB_FILE="$dirname/sumaris-core/target/sumaris-db-$current.zip" DB_FILE="$dirname/sumaris-core/target/sumaris-db-$current.zip"
if [[ ! -f "${DB_FILE}" ]]; then if [[ ! -f "${DB_FILE}" ]]; then
echo "ERROR: Missing DB ZIP artifact: ${DB_FILE}. Skipping uppload" echo "ERROR: Missing DB ZIP artifact: ${DB_FILE}. Skipping uppload"
missing_file=true missing_file=true
else else
result=`curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${DB_FILE}" "$upload_url?name=sumaris-db-$current.zip"` artifact_name="sumaris-db-$current.zip"
result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${DB_FILE}" "${upload_url}?name=${artifact_name}")
browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"` browser_download_url=`echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"`
DB_SHA256=$(sha256sum "${DB_FILE}") DB_SHA256=$(sha256sum "${DB_FILE}" | sed 's/ /\n/gi' | head -n 1)
echo " - $browser_download_url | SHA256 Checksum: ${DB_SHA256}" echo " - $browser_download_url | SHA256: ${DB_SHA256}"
echo "${DB_SHA256}" > ${DB_FILE}.sha256 echo "${DB_SHA256} ${artifact_name}" > ${DB_FILE}.sha256
result=`curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: text/plain' -T "${DB_FILE}.sha256" "$upload_url?name=sumaris-db-$current.zip.sha256"` result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: text/plain' -T "${DB_FILE}.sha256" "${upload_url}?name=${artifact_name}.sha256")
fi fi
if [[ ${missing_file} == true ]]; then if [[ ${missing_file} == true ]]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment