diff --git a/.gitignore b/.gitignore index e757503..ea33241 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /azure-sdk-for-python-9d4f5a6d6da6ba453c5553a33177553da9d1ba5f.tar.gz /azure-sdk-tools-a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586.tar.gz -/generate-sdk-tools-tarball.sh diff --git a/generate-sdk-tools-tarball.sh b/generate-sdk-tools-tarball.sh new file mode 100755 index 0000000..ae81f21 --- /dev/null +++ b/generate-sdk-tools-tarball.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# This script generates the source code for the python-azure-sdk-tools +# Fedora package. +set -euxo pipefail + +CURRENT_DIR=$(pwd) +COMMIT=$1 +SHORTCOMMIT=${COMMIT:0:7} +TMP_DIR=$(mktemp -d) + +USER=azure +PROJECT=azure-sdk-for-python + +pushd $TMP_DIR + wget https://github.com/${USER}/${PROJECT}/archive/${COMMIT}/azure-sdk-for-python-${SHORTCOMMIT}.tar.gz + tar xf azure-sdk-for-python-${SHORTCOMMIT}.tar.gz + # Bring over the license from the root of the repository. + cp azure-sdk-for-python-${COMMIT}/LICENSE.txt azure-sdk-for-python-${COMMIT}/tools/azure-sdk-tools/ + pushd azure-sdk-for-python-${COMMIT}/tools/azure-sdk-tools + tar -cz -f ${CURRENT_DIR}/azure-sdk-tools-${COMMIT}.tar.gz . + popd +popd + +rm -rf $TMP_DIR diff --git a/sources b/sources index c678c0b..7ac937b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (generate-sdk-tools-tarball.sh) = 0f25818b8ae5915c4ab7bb8ba9bfe03c7ed79ae53b2f70fb897dad61314935c7a8e24ce75569e3c61c13089a9e099d718be4ac6a40b1c7ad613fb89e7646f49f +SHA512 (azure-sdk-tools-a5a4ef4a7adc8c730dd7da2e9e3bdb43c9376586.tar.gz) = a1a5f3373ef9a17a39b0ea0584aa2a4c866bd44e56c721e7420c1960304f5c6c5500efade23f416a566c8d32f256776e11e321c777fc8cee4d6e53b6e2d0938b