[release] update release script

* create tar.bz2 and tar.xz alongside tar.gz
* add sha512
This commit is contained in:
Armin Novak 2023-12-22 10:22:25 +01:00 committed by akallabeth
parent 7d641a67b9
commit 593dacdc3d

View File

@ -24,6 +24,24 @@ if [ -z ${TAG:-} ];then
esac esac
fi fi
function create_hash {
NAME=$1
run md5sum ${NAME} > ${NAME}.md5
run sha1sum ${NAME} > ${NAME}.sha1
run sha256sum ${NAME} > ${NAME}.sha256
run sha512sum ${NAME} > ${NAME}.sha512
}
function create_tar {
ARGS=$1
EXT=$2
TAG=$3
NAME=freerdp-${TAG}${EXT}
run tar $ARGS ${NAME} freerdp-${TAG}
create_hash ${NAME}
}
TMPDIR=$(mktemp -d -t release-${TAG}-XXXXXXXXXX) TMPDIR=$(mktemp -d -t release-${TAG}-XXXXXXXXXX)
run git archive --prefix=freerdp-${TAG}/ --format=tar.gz -o ${TMPDIR}/freerdp-${TAG}.tar.gz ${TAG} run git archive --prefix=freerdp-${TAG}/ --format=tar.gz -o ${TMPDIR}/freerdp-${TAG}.tar.gz ${TAG}
@ -32,18 +50,16 @@ run echo ${TAG} > ${TMPDIR}/freerdp-${TAG}/.source_version
pushd . pushd .
cd $TMPDIR cd $TMPDIR
run tar czvf freerdp-${TAG}.tar.gz freerdp-${TAG} create_tar czf .tar.gz ${TAG}
run md5sum freerdp-${TAG}.tar.gz > freerdp-${TAG}.tar.gz.md5 create_tar cvjSf .tar.bz2 ${TAG}
run sha1sum freerdp-${TAG}.tar.gz > freerdp-${TAG}.tar.gz.sha1 create_tar cfJ .tar.xz ${TAG}
run sha256sum freerdp-${TAG}.tar.gz > freerdp-${TAG}.tar.gz.sha256
run zip -r freerdp-${TAG}.zip freerdp-${TAG} ZIPNAME=freerdp-${TAG}.zip
run md5sum freerdp-${TAG}.zip > freerdp-${TAG}.zip.md5 run zip -r ${ZIPNAME} freerdp-${TAG}
run sha1sum freerdp-${TAG}.zip > freerdp-${TAG}.zip.sha1 create_hash ${ZIPNAME}
run sha256sum freerdp-${TAG}.zip > freerdp-${TAG}.zip.sha256
popd popd
run mv ${TMPDIR}/freerdp-${TAG}.tar.gz* . run mv ${TMPDIR}/freerdp-${TAG}.tar* .
run mv ${TMPDIR}/freerdp-${TAG}.zip* . run mv ${TMPDIR}/freerdp-${TAG}.zip* .
run rm -rf ${TMPDIR} run rm -rf ${TMPDIR}
exit 0 exit 0