21 lines
No EOL
816 B
Bash
Executable file
21 lines
No EOL
816 B
Bash
Executable file
#!/bin/bash
|
|
set -euxo pipefail
|
|
|
|
export VERSION=1.10.0
|
|
export PACKAGE_NAME=azure-identity
|
|
WORKING_DIR=$(pwd)
|
|
|
|
# Download the release and unpack it.
|
|
curl -LO https://github.com/Azure/azure-sdk-for-python/archive/refs/tags/${PACKAGE_NAME}_${VERSION}.tar.gz
|
|
tar xzf ${PACKAGE_NAME}_${VERSION}.tar.gz
|
|
|
|
# Find the package directory in the SDK release and the parent directory.
|
|
PACKAGE_DIR=$(find azure-sdk-for-python-${PACKAGE_NAME}_${VERSION} -type d -name $PACKAGE_NAME)
|
|
PARENT_DIR=$(dirname $PACKAGE_DIR)
|
|
|
|
# Build a tarball with a prefix directory that contains the package name and
|
|
# version. Store that in the directory where the script is running.
|
|
pushd $PARENT_DIR
|
|
tar --transform "s/^${PACKAGE_NAME}/${PACKAGE_NAME}-${VERSION}/" -cz \
|
|
-f ${WORKING_DIR}/${PACKAGE_NAME}-${VERSION}.tgz $PACKAGE_NAME
|
|
popd |