1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-10 07:42:09 -04:00

distro: Let the workflow run

This commit is contained in:
purian23
2025-12-13 22:54:58 -05:00
parent b40df5f1c4
commit d336866f44
2 changed files with 36 additions and 10 deletions

View File

@@ -209,7 +209,8 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
if [[ "$SOURCE_FORMAT" == *"native"* ]]; then
BASE_VERSION="${LATEST_TAG}"
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${LATEST_TAG}ppa([0-9]+)$ ]]; then
if [[ "$IS_MANUAL" == true ]]; then
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
# Only error for true local manual runs, not CI/workflow runs
error "Same version detected ($CURRENT_VERSION) but no rebuild number specified"
error "To rebuild, explicitly specify a rebuild number:"
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
@@ -217,7 +218,7 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
exit 1
else
info "Detected rebuild of same version (current: $CURRENT_VERSION). Not a manual run, skipping."
info "Detected rebuild of same version (current: $CURRENT_VERSION). No changes needed, skipping."
success "No changes needed (version matches)."
exit 0
fi
@@ -229,7 +230,8 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
BASE_VERSION="${LATEST_TAG}-1"
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/-/\\-/g')
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
if [[ "$IS_MANUAL" == true ]]; then
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
# Only error for true local manual runs, not CI/workflow runs
error "Same version detected ($CURRENT_VERSION) but no rebuild number specified"
error "To rebuild, explicitly specify a rebuild number:"
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
@@ -237,7 +239,7 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
exit 1
else
info "Detected rebuild of same version (current: $CURRENT_VERSION). Not a manual run, skipping."
info "Detected rebuild of same version (current: $CURRENT_VERSION). No changes needed, skipping."
success "No changes needed (version matches)."
exit 0
fi
@@ -384,7 +386,8 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
PPA_NUM=1
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/+/\\+/g')
if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
if [[ "$IS_MANUAL" == true ]]; then
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
# Only error for true local manual runs, not CI/workflow runs
error "Same commit detected ($CURRENT_VERSION) but no rebuild number specified"
error "To rebuild, explicitly specify a rebuild number:"
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
@@ -392,7 +395,7 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
exit 1
else
info "Detected rebuild of same commit (current: $CURRENT_VERSION). Not a manual run, skipping."
info "Detected rebuild of same commit (current: $CURRENT_VERSION). No changes needed, skipping."
success "No changes needed (commit matches)."
exit 0
fi