* Fixed issue with spacing in help param processing
+ Not caching cargo builds in default docker container
This commit is contained in:
		
							parent
							
								
									462fe463f7
								
							
						
					
					
						commit
						ea17628827
					
				@ -6,6 +6,7 @@
 | 
			
		||||
cargo_targets="json-api"
 | 
			
		||||
 | 
			
		||||
no_cargo_cache=false
 | 
			
		||||
ask_help=false
 | 
			
		||||
 | 
			
		||||
mkdir -p bin/
 | 
			
		||||
# Statically built binaries make this part really easy
 | 
			
		||||
@ -35,7 +36,7 @@ build_cargo_targets() {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ -z $1 ];then
 | 
			
		||||
show_help() {
 | 
			
		||||
cat <<EOF
 | 
			
		||||
Script for BUILDING(not running/installing services) all relevant server binaries
 | 
			
		||||
Primarily to be used in docker images
 | 
			
		||||
@ -46,13 +47,25 @@ Available options:
 | 
			
		||||
		Benefit: less disk usage as it cleans up unused files after a 'cargo build --release'
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
else
 | 
			
		||||
	for arg in $@;do
 | 
			
		||||
		if [ "$arg" = "--no-cargo-cache" ];then
 | 
			
		||||
			no_cargo_cache=true
 | 
			
		||||
		fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
	done
 | 
			
		||||
for arg in $@;do
 | 
			
		||||
	if [ "$arg" = "--no-cargo-cache" ];then
 | 
			
		||||
		no_cargo_cache=true
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
	if [ "$arg" = "--help" ];then ask_help=true; fi
 | 
			
		||||
	if [ "$arg" = "-h" ];then ask_help=true; fi
 | 
			
		||||
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ $ask_help = "true" ];then
 | 
			
		||||
	# show help and quit
 | 
			
		||||
	show_help
 | 
			
		||||
else
 | 
			
		||||
	# normal building process
 | 
			
		||||
	build_cargo_targets
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,5 @@ RUN apk add git
 | 
			
		||||
 | 
			
		||||
# Now we being the freechat installation process
 | 
			
		||||
RUN git clone https://gitlab.com/shockrah/freechat.git/ /opt/freechat/
 | 
			
		||||
RUN cd /opt/freechat/
 | 
			
		||||
RUN sh docker-auto-build.sh
 | 
			
		||||
RUN /opt/
 | 
			
		||||
RUN sh /opt/freechat/docker-auto-build.sh --no-cargo-cache
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user