Adds builds scripts that are used to build releases deterministically. Also adds documentation that explains the release process and what the build scripts do.
33 lines
570 B
Bash
Executable File
33 lines
570 B
Bash
Executable File
#! /bin/bash
|
|
# Generates the setup.py file
|
|
|
|
set -e
|
|
|
|
# Setup poetry and install the dependencies
|
|
poetry install
|
|
|
|
# Build the source distribution
|
|
poetry build -f sdist
|
|
|
|
# Extract setup.py from the distribution
|
|
unset -v tarball
|
|
for file in dist/*
|
|
do
|
|
if [[ $file -nt $tarball && $file == *".tar.gz" ]]
|
|
then
|
|
tarball=$file
|
|
fi
|
|
done
|
|
unset -v toextract
|
|
for file in `tar -tf $tarball`
|
|
do
|
|
if [[ $file == *"setup.py" ]]
|
|
then
|
|
toextract=$file
|
|
fi
|
|
done
|
|
tar -xf $tarball $toextract
|
|
mv $toextract .
|
|
dir=`echo $toextract | cut -f1 -d"/"`
|
|
rm -r $dir
|