Neue Datei hinzufügen
This commit is contained in:
87
publish-pupnet.sh
Normal file
87
publish-pupnet.sh
Normal file
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
TAG="$1"
|
||||
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Please enter a version!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
########################################
|
||||
# Create local git tag
|
||||
########################################
|
||||
|
||||
# Falls Tag existiert → löschen (lokal + remote)
|
||||
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
||||
echo "Tag '$TAG' alredy exists and will be deleted..."
|
||||
git tag -d "$TAG"
|
||||
fi
|
||||
|
||||
# Neues Tag erzeugen
|
||||
echo "Create tag '$TAG'..."
|
||||
git tag "$TAG"
|
||||
|
||||
########################################
|
||||
# Publish
|
||||
########################################
|
||||
|
||||
build_for_dir () {
|
||||
local dir="$1"
|
||||
|
||||
echo "→ Executing embedded publish commands in $dir ..."
|
||||
(
|
||||
cd "$dir"
|
||||
|
||||
# Helper to avoid repetition
|
||||
build() {
|
||||
local runtime="$1"
|
||||
local kind="$2"
|
||||
pupnet -y -v "$TAG[1]" -r "$runtime" -k "$kind"
|
||||
}
|
||||
|
||||
# linux-x64
|
||||
build linux-x64 appimage &
|
||||
# build linux-x64 flatpak &
|
||||
# build linux-x64 deb &
|
||||
# build linux-x64 rpm &
|
||||
|
||||
# linux-arm64
|
||||
build linux-arm64 appimage &
|
||||
# build linux-arm64 flatpak &
|
||||
# build linux-arm64 deb &
|
||||
# build linux-arm64 rpm &
|
||||
|
||||
# windows
|
||||
build win-x64 zip &
|
||||
build win-arm64 zip &
|
||||
|
||||
# macOS
|
||||
build osx-x64 zip &
|
||||
build osx-arm64 zip &
|
||||
|
||||
wait # <--- wartet auf ALLE oben gestarteten Jobs
|
||||
echo "All builds for $dir completed."
|
||||
)
|
||||
}
|
||||
|
||||
for dir in ../*/; do
|
||||
if [ -f "${dir}app.pupnet.conf" ]; then
|
||||
build_for_dir "$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
########################################
|
||||
# Push git tag
|
||||
########################################
|
||||
echo "Push tag '$TAG'..."
|
||||
git push --delete origin "$TAG" || true
|
||||
git push origin "$TAG" --force
|
||||
|
||||
########################################
|
||||
# Remove artifacts
|
||||
########################################
|
||||
echo "Remove artifacts..."
|
||||
rm -r ../publish/*/Artifacts*
|
||||
|
||||
echo "Completed!"
|
||||
Reference in New Issue
Block a user