improved the build and upload

Dieser Commit ist enthalten in:
Sebastian Tobie 2024-03-08 22:44:08 +01:00
Ursprung 0ba608406e
Commit cd1d5aa84e
3 geänderte Dateien mit 6 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -11,11 +11,11 @@ docs: format
clean-dist:
rm -rf dist
hatch-release:
hatch-release: clean-dist
hatch build
galaxy-release: clean-dist changelog
ansible-galaxy collection build --output-path dist
ansible-galaxy collection build --output-path dist/galaxy
upload: galaxy-release hatch-release
./upload.sh

Datei anzeigen

@ -23,7 +23,8 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []
[tool.hatch.build]
directory = "dist/python"
[project.urls]
Documentation = "https://github.com/unknown/ansible-module#readme"
Issues = "https://github.com/unknown/ansible-module/issues"

Datei anzeigen

@ -3,13 +3,5 @@ user=$(yq -r .namespace galaxy.yml)
package=$(yq -r .name galaxy.yml)
version=$(yq -r .version galaxy.yml)
printf "Namespace: %s\nPackage: %s\nVersion: %s\n" $user $package $version
upload(){
name=$(basename "$1")
printf "uploading: %s as %s\n" "$1" "$name"
curl -u sebastian --upload-file "$1" "https://gitea.sebastian-tobie.de/api/packages/ansible/generic/${package}/${version}/$name"
}
for file in dist/sebastian* ; do
upload "$file"
done
rm -f dist/sebastian*
hatch publish -r ansible
ansible-galaxy collection publish dist/galaxy/*
hatch publish -r ansible dist/python/*