[+] Better build script

This commit is contained in:
Azalea 2024-04-23 07:42:08 -04:00
parent d47a63d237
commit 6f9155fe83
4 changed files with 389 additions and 12 deletions

View file

@ -22,17 +22,8 @@ cd dist
# Get the file name
file=$(ls | grep .whl)
# Get the git distribution if it doesn't exist
if [ ! -f git.tar.bz2 ]; then
#URL="https://github.com/git-for-windows/git/releases/download/v2.44.0.windows.1/Git-2.44.0-64-bit.tar.bz2"
# NOTE: Git for Windows v2.44 is the last release to support Windows 7 and 8
URL="https://github.com/git-for-windows/git/releases/download/v2.44.0.windows.1/Git-2.44.0-32-bit.tar.bz2"
wget $URL -O git.tar.bz2
fi
# Unzip the git distribution to git directory
mkdir git
tar -xvf git.tar.bz2 -C git
# Build bash pacakge
$DIR/build_bash.sh
# Unzip the wheel
unzip $file -d wheel
@ -44,7 +35,7 @@ cp -r git/ wheel/hyfetch/
new_name="$(echo $file | sed 's/-none-any/-win32/')"
# Zip the wheel to win_amd64.whl
cd wheel && zip -r "../$new_name" * && cd ..
cd wheel && zip -y -r "../$new_name" * && cd ..
# Check again
twine check $new_name