improved the build and upload
Dieser Commit ist enthalten in:
Ursprung
0ba608406e
Commit
cd1d5aa84e
4
Makefile
4
Makefile
|
@ -11,11 +11,11 @@ docs: format
|
||||||
clean-dist:
|
clean-dist:
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
|
||||||
hatch-release:
|
hatch-release: clean-dist
|
||||||
hatch build
|
hatch build
|
||||||
|
|
||||||
galaxy-release: clean-dist changelog
|
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: galaxy-release hatch-release
|
||||||
./upload.sh
|
./upload.sh
|
||||||
|
|
|
@ -23,7 +23,8 @@ classifiers = [
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
[tool.hatch.build]
|
||||||
|
directory = "dist/python"
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Documentation = "https://github.com/unknown/ansible-module#readme"
|
Documentation = "https://github.com/unknown/ansible-module#readme"
|
||||||
Issues = "https://github.com/unknown/ansible-module/issues"
|
Issues = "https://github.com/unknown/ansible-module/issues"
|
||||||
|
|
12
upload.sh
12
upload.sh
|
@ -3,13 +3,5 @@ user=$(yq -r .namespace galaxy.yml)
|
||||||
package=$(yq -r .name galaxy.yml)
|
package=$(yq -r .name galaxy.yml)
|
||||||
version=$(yq -r .version galaxy.yml)
|
version=$(yq -r .version galaxy.yml)
|
||||||
printf "Namespace: %s\nPackage: %s\nVersion: %s\n" $user $package $version
|
printf "Namespace: %s\nPackage: %s\nVersion: %s\n" $user $package $version
|
||||||
upload(){
|
ansible-galaxy collection publish dist/galaxy/*
|
||||||
name=$(basename "$1")
|
hatch publish -r ansible dist/python/*
|
||||||
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
|
|
||||||
|
|
Laden…
In neuem Issue referenzieren