You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			30 lines
		
	
	
		
			587 B
		
	
	
	
		
			Bash
		
	
			
		
		
	
	
			30 lines
		
	
	
		
			587 B
		
	
	
	
		
			Bash
		
	
| #!/bin/bash
 | |
| 
 | |
| set -e
 | |
| 
 | |
| os="$1"
 | |
| codename="$2"
 | |
| build_tag="$3"
 | |
| 
 | |
| detect_package_format() {
 | |
|   package_format=rpm
 | |
|   if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
 | |
|     package_format=deb
 | |
|   fi
 | |
| }
 | |
| 
 | |
| warn_build_tag_not_supported_for_rpm_and_exit() {
 | |
|   if [[ "$build_tag" && "$package_format" = "rpm" ]]; then
 | |
|     echo >&2 "<build_tag> isn't supported for rpm"
 | |
|     exit 1
 | |
|   fi
 | |
| }
 | |
| 
 | |
| cd "$(dirname "$0")/.."
 | |
| 
 | |
| detect_package_format
 | |
| warn_build_tag_not_supported_for_rpm_and_exit
 | |
| 
 | |
| builder/build-tarball "$os" "$codename" "$build_tag"
 | |
| builder/build-${package_format} "$os" "$codename" "$build_tag"
 |