mirror of
				https://github.com/InsanusMokrassar/MicroUtils.git
				synced 2025-11-04 06:00:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			706 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			706 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
function send_notification() {
 | 
						|
    echo "$1"
 | 
						|
}
 | 
						|
 | 
						|
function assert_success() {
 | 
						|
    "${@}"
 | 
						|
    local status=${?}
 | 
						|
    if [ ${status} -ne 0 ]; then
 | 
						|
        send_notification "### Error ${status} at: ${BASH_LINENO[*]} ###"
 | 
						|
        exit ${status}
 | 
						|
    fi
 | 
						|
}
 | 
						|
 | 
						|
readarray -t projects <<< "`./gradlew getPublishableModules --quiet`"
 | 
						|
for project in "${projects[@]}"; do
 | 
						|
    echo "Start publishing of $project"
 | 
						|
    assert_success ./gradlew "$project:publishAllPublicationsToSonatypeRepository" --no-parallel --quiet
 | 
						|
    echo "Complete publishing of $project"
 | 
						|
    echo "Start uploading of $project"
 | 
						|
    assert_success ./uploadSonatypePublication.main.kts --quiet
 | 
						|
    echo "Complete uploading of $project"
 | 
						|
done
 |