mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-05 21:15:38 -05:00
Workflow updates
This commit is contained in:
2
.github/workflows/run-copr.yml
vendored
2
.github/workflows/run-copr.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: DMS Copr Stable Release (Manual)
|
name: DMS Copr Stable Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|||||||
6
.github/workflows/run-obs.yml
vendored
6
.github/workflows/run-obs.yml
vendored
@@ -7,6 +7,10 @@ on:
|
|||||||
description: 'Package to update (dms, dms-git, or all)'
|
description: 'Package to update (dms, dms-git, or all)'
|
||||||
required: false
|
required: false
|
||||||
default: 'all'
|
default: 'all'
|
||||||
|
rebuild_release:
|
||||||
|
description: 'Release number for rebuilds (e.g., 2, 3, 4 to increment spec Release)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
@@ -80,6 +84,8 @@ jobs:
|
|||||||
chmod 600 ~/.config/osc/oscrc
|
chmod 600 ~/.config/osc/oscrc
|
||||||
|
|
||||||
- name: Upload to OBS
|
- name: Upload to OBS
|
||||||
|
env:
|
||||||
|
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
||||||
run: |
|
run: |
|
||||||
PACKAGES="${{ steps.packages.outputs.packages }}"
|
PACKAGES="${{ steps.packages.outputs.packages }}"
|
||||||
MESSAGE="Automated update from GitHub Actions"
|
MESSAGE="Automated update from GitHub Actions"
|
||||||
|
|||||||
9
.github/workflows/run-ppa.yml
vendored
9
.github/workflows/run-ppa.yml
vendored
@@ -7,6 +7,10 @@ on:
|
|||||||
description: 'Package to upload (dms, dms-git, or all)'
|
description: 'Package to upload (dms, dms-git, or all)'
|
||||||
required: false
|
required: false
|
||||||
default: 'dms-git'
|
default: 'dms-git'
|
||||||
|
rebuild_release:
|
||||||
|
description: 'Release number for rebuilds (e.g., 2, 3, 4 for ppa2, ppa3, ppa4)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */3 * * *' # Every 3 hours for dms-git builds
|
- cron: '0 */3 * * *' # Every 3 hours for dms-git builds
|
||||||
|
|
||||||
@@ -54,6 +58,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload to PPA
|
- name: Upload to PPA
|
||||||
|
env:
|
||||||
|
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
||||||
run: |
|
run: |
|
||||||
PACKAGES="${{ steps.packages.outputs.packages }}"
|
PACKAGES="${{ steps.packages.outputs.packages }}"
|
||||||
|
|
||||||
@@ -62,6 +68,9 @@ jobs:
|
|||||||
if [[ "$PACKAGES" == "all" ]]; then
|
if [[ "$PACKAGES" == "all" ]]; then
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
echo "Uploading dms to PPA..."
|
echo "Uploading dms to PPA..."
|
||||||
|
if [ -n "$REBUILD_RELEASE" ]; then
|
||||||
|
echo "🔄 Using rebuild release number: ppa$REBUILD_RELEASE"
|
||||||
|
fi
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
bash create-and-upload.sh "../dms" dms questing
|
bash create-and-upload.sh "../dms" dms questing
|
||||||
|
|
||||||
|
|||||||
@@ -497,14 +497,46 @@ esac
|
|||||||
|
|
||||||
cd - > /dev/null
|
cd - > /dev/null
|
||||||
|
|
||||||
|
# Check if this version already exists on PPA (only in CI environment)
|
||||||
|
if command -v rmadison >/dev/null 2>&1; then
|
||||||
|
info "Checking if version already exists on PPA..."
|
||||||
|
PPA_VERSION_CHECK=$(rmadison -u ppa:avengemedia/dms "$PACKAGE_NAME" 2>/dev/null | grep "$VERSION" || true)
|
||||||
|
if [ -n "$PPA_VERSION_CHECK" ]; then
|
||||||
|
warn "Version $VERSION already exists on PPA:"
|
||||||
|
echo "$PPA_VERSION_CHECK"
|
||||||
|
echo
|
||||||
|
warn "Skipping upload to avoid duplicate. If this is a rebuild, increment the ppa number."
|
||||||
|
cd "$PACKAGE_DIR"
|
||||||
|
# Still clean up extracted sources
|
||||||
|
case "$PACKAGE_NAME" in
|
||||||
|
dms-git)
|
||||||
|
rm -rf DankMaterialShell-*
|
||||||
|
success "Cleaned up DankMaterialShell-*/ directory"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Build source package
|
# Build source package
|
||||||
info "Building source package..."
|
info "Building source package..."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Use -S for source only, -sa to include original source
|
# Determine if we need to include orig tarball (-sa) or just debian changes (-sd)
|
||||||
|
# Check if .orig.tar.xz already exists in parent directory (previous build)
|
||||||
|
ORIG_TARBALL="${PACKAGE_NAME}_${VERSION%.ppa*}.orig.tar.xz"
|
||||||
|
if [ -f "../$ORIG_TARBALL" ]; then
|
||||||
|
info "Found existing orig tarball, using -sd (debian changes only)"
|
||||||
|
DEBUILD_SOURCE_FLAG="-sd"
|
||||||
|
else
|
||||||
|
info "No existing orig tarball found, using -sa (include original source)"
|
||||||
|
DEBUILD_SOURCE_FLAG="-sa"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use -S for source only, -sa/-sd for source inclusion
|
||||||
# -d skips dependency checking (we're building on Fedora, not Ubuntu)
|
# -d skips dependency checking (we're building on Fedora, not Ubuntu)
|
||||||
# Pipe yes to automatically answer prompts (e.g., "continue anyway?")
|
# Pipe yes to automatically answer prompts (e.g., "continue anyway?")
|
||||||
if yes | DEBIAN_FRONTEND=noninteractive debuild -S -sa -d; then
|
if yes | DEBIAN_FRONTEND=noninteractive debuild -S $DEBUILD_SOURCE_FLAG -d; then
|
||||||
echo
|
echo
|
||||||
success "Source package built successfully!"
|
success "Source package built successfully!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user