-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gnu version
- Loading branch information
Showing
8 changed files
with
116 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
is_windows_os=false && [[ $(uname) == Windows_NT* ]] && is_windows_os=true | ||
|
||
echo "download bsdtar ..." | ||
bsdtar_version=3.6.2 | ||
bsdtar_toolset_name="build-musl" && [[ "$is_windows_os" == true ]] && bsdtar_toolset_name="build-mingw" | ||
|
||
bsdtar_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/bsdtar-$bsdtar_version/$bsdtar_toolset_name.tar.gz" | ||
bsdtar_tar_gz="bsdtar-$bsdtar_version-$bsdtar_toolset_name.tar.gz" | ||
[[ ! -f "$bsdtar_tar_gz" ]] && wget "$bsdtar_download_url" -O "$bsdtar_tar_gz" | ||
tar -xf "$bsdtar_tar_gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
dp0="$(realpath "$(dirname "$0")")" | ||
set -e | ||
|
||
apt update | ||
apt install -y wget binutils | ||
|
||
tool_name="poetry" | ||
tool_version="1.4.1" | ||
python_self_name="python-3.11.1" | ||
self_name="$tool_name-$tool_version" | ||
self_toolset_name="build-gnu" | ||
release_version_dirpath="$dp0/release/$self_name" | ||
echo "::set-output name=tool_name::$tool_name" | ||
echo "::set-output name=tool_version::$tool_version" | ||
|
||
mkdir -p "$release_version_dirpath" && cd "$dp0/release" | ||
|
||
echo "download python install script ..." | ||
python_bin_download_url="https://github.com/hemnstill/StandaloneTools/releases/download/$python_self_name/$self_toolset_name.tar.gz" | ||
python_download_zip="$dp0/release/$python_self_name.tar.gz" | ||
[[ ! -f "$python_download_zip" ]] && wget "$python_bin_download_url" -O "$python_download_zip" | ||
|
||
"$dp0/../.tools/download_bsdtar.sh" | ||
bsdtar="$dp0/release/bsdtar" | ||
|
||
cpython_bin="$release_version_dirpath/Scripts/bin/python3" | ||
[[ ! -f "$cpython_bin" ]] && tar -xf "$python_download_zip" -C "$release_version_dirpath" | ||
|
||
echo "install poetry ..." | ||
"$cpython_bin" -m pip install "poetry==$tool_version" | ||
|
||
echo "prepare build artifacts ..." | ||
|
||
cp -f "$dp0/release/poetry.sh" "$release_version_dirpath/" | ||
cp -f "$dp0/release/__main__poetry.py" "$release_version_dirpath/" | ||
|
||
echo "creating archive ..." | ||
|
||
cd "$release_version_dirpath" | ||
{ printf '### %s | ||
%s | ||
Python %s | ||
' "$self_toolset_name.tar.gz" "$(./"$tool_name.sh" about)" "$("$cpython_bin" -c "import sys; print(sys.version)")" | ||
} > $self_toolset_name.md | ||
|
||
cat $self_toolset_name.md | ||
|
||
"$bsdtar" \ | ||
--exclude="__pycache__" \ | ||
--exclude="Scripts/Scripts" \ | ||
--exclude="*.whl" \ | ||
-czvf ../$self_toolset_name.tar.gz . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters