mirror of
				https://gitlab.archlinux.org/archlinux/devtools.git
				synced 2025-10-27 05:52:13 +01:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 73d61f43c7 | ||
|   | afc93f3430 | ||
|   | 9ab0d94578 | ||
|   | 5e8cb67603 | 
| @@ -1,13 +1,32 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| m4_include(lib/common.sh) | ||||
| m4_include(lib/valid-tags.sh) | ||||
|  | ||||
| if [[ -z $1 ]]; then | ||||
| 	echo 'Usage: archrelease <repo>...' | ||||
| # parse command line options | ||||
| FORCE= | ||||
| while getopts ':f' flag; do | ||||
| 	case $flag in | ||||
| 		f) FORCE=1 ;; | ||||
| 		:) die "Option requires an argument -- '$OPTARG'" ;; | ||||
| 		\?) die "Invalid option -- '$OPTARG'" ;; | ||||
| 	esac | ||||
| done | ||||
| shift $(( OPTIND - 1 )) | ||||
|  | ||||
| if ! (( $# )); then | ||||
| 	echo 'Usage: archrelease [-f] <repo>...' | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| # TODO: validate repo is really repo-arch | ||||
| # validate repo is really repo-arch | ||||
| if [[ -z $FORCE ]]; then | ||||
| 	for tag in "$@"; do | ||||
| 		if ! in_array "$tag" "${_tags[@]}"; then | ||||
| 			die 'archrelease: Invalid tag: "'$tag'" (use -f to force release)' | ||||
| 		fi | ||||
| 	done | ||||
| fi | ||||
|  | ||||
| if [[ ! -f PKGBUILD ]]; then | ||||
| 	die 'archrelease: PKGBUILD not found' | ||||
|   | ||||
							
								
								
									
										12
									
								
								commitpkg.in
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								commitpkg.in
									
									
									
									
									
								
							| @@ -143,21 +143,17 @@ for _arch in ${arch[@]}; do | ||||
| 		uploads+=("$pkgfile") | ||||
|  | ||||
| 		sigfile="${pkgfile}.sig" | ||||
| 		if [[ $SIGNPKG == 'y' && ! -f $sigfile ]]; then | ||||
| 		if [[ ! -f $sigfile ]]; then | ||||
| 			msg "Signing package ${pkgfile}..." | ||||
| 			if [[ -n $GPGKEY ]]; then | ||||
| 				SIGNWITHKEY="-u ${GPGKEY}" | ||||
| 			fi | ||||
| 			gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || die | ||||
| 		fi | ||||
| 		if [[ -f $sigfile ]]; then | ||||
| 			if ! gpg --verify "$sigfile" >/dev/null 2>&1; then | ||||
| 				die "Signature ${pkgfile}.sig is incorrect!" | ||||
| 			fi | ||||
| 			uploads+=("$sigfile") | ||||
| 		else | ||||
| 			die "Signature ${pkgfile}.sig was not found" | ||||
| 		if ! gpg --verify "$sigfile" >/dev/null 2>&1; then | ||||
| 			die "Signature ${pkgfile}.sig is incorrect!" | ||||
| 		fi | ||||
| 		uploads+=("$sigfile") | ||||
| 	done | ||||
| done | ||||
|  | ||||
|   | ||||
							
								
								
									
										20
									
								
								lib/valid-tags.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								lib/valid-tags.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| _arch=( | ||||
| 	i686 | ||||
| 	x86_64 | ||||
| 	any | ||||
| ) | ||||
|  | ||||
| _tags=( | ||||
| 	core-i686 core-x86_64 core-any | ||||
| 	extra-i686 extra-x86_64 extra-any | ||||
| 	multilib-x86_64 | ||||
| 	staging-i686 staging-x86_64 staging-any | ||||
| 	testing-i686 testing-x86_64 testing-any | ||||
| 	multilib-testing-x86_64 | ||||
| 	multilib-staging-x86_64 | ||||
| 	community-i686 community-x86_64 community-any | ||||
| 	community-staging-i686 community-staging-x86_64 community-staging-any | ||||
| 	community-testing-i686 community-testing-x86_64 community-testing-any | ||||
| 	kde-unstable-i686 kde-unstable-x86_64 kde-unstable-any | ||||
| 	gnome-unstable-i686 gnome-unstable-x86_64 gnome-unstable-any | ||||
| ) | ||||
| @@ -1,21 +1,6 @@ | ||||
| #compdef archbuild archco archrelease archrm commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-i686-build=archbuild extra-x86_64-build=archbuild testing-i686-build=archbuild testing-x86_64-build=archbuild staging-i686-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-i686-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-i686-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco | ||||
|  | ||||
| _arch=(i686 x86_64 any) | ||||
|  | ||||
| _tags=( | ||||
| 	core-i686 core-x86_64 core-any | ||||
| 	extra-i686 extra-x86_64 extra-any | ||||
| 	multilib-i686 multilib-x86_64 multilib-any | ||||
| 	staging-i686 staging-x86_64 staging-any | ||||
| 	testing-i686 testing-x86_64 testing-any | ||||
| 	multilib-testing-i686 multilib-testing-x86_64 multilib-testing-any | ||||
| 	multilib-staging-i686 multilib-staging-x86_64 multilib-staging-any | ||||
| 	community-i686 community-x86_64 community-any | ||||
| 	community-staging-i686 community-staging-x86_64 community-staging-any | ||||
| 	community-testing-i686 community-testing-x86_64 community-testing-any | ||||
| 	kde-unstable-i686 kde-unstable-x86_64 kde-unstable-any | ||||
| 	gnome-unstable-i686 gnome-unstable-x86_64 gnome-unstable-any | ||||
| ) | ||||
| m4_include(lib/valid-tags.sh) | ||||
|  | ||||
| _archbuild_args=( | ||||
| 	'-c[Recreate the chroot before building]' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user