Add --package filter to repo migrate for single-package stable promotion
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2eb15bc726
commit
d6b146bdc9
2 files changed
+20
-1
No files matched your search
@@ -158,6 +158,7 @@ AUR sync is metadata-driven. It preserves `.omarchy/`, replaces the package root
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
bin/repo migrate --arch x86_64 # Promote tested edge artifacts -> stable, then clean + update
|
bin/repo migrate --arch x86_64 # Promote tested edge artifacts -> stable, then clean + update
|
||||||
|
bin/repo migrate --package <name> # Promote a single package -> stable
|
||||||
bin/repo migrate --dry-run # Preview migration and cleanup
|
bin/repo migrate --dry-run # Preview migration and cleanup
|
||||||
bin/repo list # List package metadata
|
bin/repo list # List package metadata
|
||||||
bin/add-package <package> # Add an AUR/local package with metadata
|
bin/add-package <package> # Add an AUR/local package with metadata
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ source "$BUILD_ROOT/helpers/paths.sh"
|
|||||||
DRY_RUN=false
|
DRY_RUN=false
|
||||||
SYNC_REMOTE=""
|
SYNC_REMOTE=""
|
||||||
SKIP_PROD_CHECK=false
|
SKIP_PROD_CHECK=false
|
||||||
|
PACKAGE=""
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -18,6 +19,10 @@ while [[ $# -gt 0 ]]; do
|
|||||||
update_arch_paths
|
update_arch_paths
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--package)
|
||||||
|
PACKAGE="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--dry-run)
|
--dry-run)
|
||||||
DRY_RUN=true
|
DRY_RUN=true
|
||||||
shift
|
shift
|
||||||
@@ -35,6 +40,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --arch <arch> Target architecture (x86_64 or aarch64, default: x86_64)"
|
echo " --arch <arch> Target architecture (x86_64 or aarch64, default: x86_64)"
|
||||||
|
echo " --package <name> Migrate only the specified package"
|
||||||
echo " --dry-run Preview migration and cleanup without changing files"
|
echo " --dry-run Preview migration and cleanup without changing files"
|
||||||
echo " --sync-remote <path> Rclone remote for sync (default: pkgs.omarchy.org:omarchy-pkgs)"
|
echo " --sync-remote <path> Rclone remote for sync (default: pkgs.omarchy.org:omarchy-pkgs)"
|
||||||
echo " --skip-prod-check Skip production environment check during sync"
|
echo " --skip-prod-check Skip production environment check during sync"
|
||||||
@@ -67,6 +73,18 @@ if [[ ! -d "$SOURCE_DIR" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Version segment starts with a digit (same assumption as bin/clean-repo),
|
||||||
|
# so omarchy-nvim doesn't also match omarchy-nvim-extras
|
||||||
|
PACKAGE_GLOB="*"
|
||||||
|
if [[ -n "$PACKAGE" ]]; then
|
||||||
|
print_info "Package: $PACKAGE"
|
||||||
|
PACKAGE_GLOB="$PACKAGE-[0-9]*"
|
||||||
|
if ! compgen -G "$SOURCE_DIR/$PACKAGE_GLOB.pkg.tar.*" >/dev/null; then
|
||||||
|
print_error "No artifacts matching $PACKAGE_GLOB.pkg.tar.* found in $SOURCE_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$TARGET_DIR"
|
mkdir -p "$TARGET_DIR"
|
||||||
|
|
||||||
if [[ "$DRY_RUN" == true ]]; then
|
if [[ "$DRY_RUN" == true ]]; then
|
||||||
@@ -74,7 +92,7 @@ if [[ "$DRY_RUN" == true ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_info "Syncing package files from edge to stable (ignore existing)..."
|
print_info "Syncing package files from edge to stable (ignore existing)..."
|
||||||
RSYNC_FLAGS="-av --ignore-existing --include=*/ --include=*.pkg.tar.* --exclude=*"
|
RSYNC_FLAGS="-av --ignore-existing --include=*/ --include=$PACKAGE_GLOB.pkg.tar.* --exclude=*"
|
||||||
if [[ "$DRY_RUN" == true ]]; then
|
if [[ "$DRY_RUN" == true ]]; then
|
||||||
RSYNC_FLAGS="$RSYNC_FLAGS -n"
|
RSYNC_FLAGS="$RSYNC_FLAGS -n"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user