mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 13:42:55 +00:00 
			
		
		
		
	Refactor hack script due to multistage building
This commit is contained in:
		@@ -14,11 +14,11 @@ source "${libhack_dir}/common.sh"
 | 
			
		||||
 | 
			
		||||
challenge::build() {
 | 
			
		||||
    pushd "${CHALLENGE_PATH}"
 | 
			
		||||
    args="--build-arg NOFRONTEND=1" build_challenge_internal
 | 
			
		||||
    args="" build_challenge_internal
 | 
			
		||||
    popd
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
challenge::build_with_frontend() {
 | 
			
		||||
challenge::build_no_cache() {
 | 
			
		||||
    pushd "${CHALLENGE_PATH}"
 | 
			
		||||
    args="--no-cache" build_challenge_internal
 | 
			
		||||
    popd
 | 
			
		||||
 
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
# Requires context:
 | 
			
		||||
#     - FRONTEND_PATH: absolute path of frontend repo
 | 
			
		||||
#     - CHALLENGE_PATH: absolute path of challenge repo
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
frontend::run() {
 | 
			
		||||
    local frontend_in_challenge="${CHALLENGE_PATH}/solvable/frontend"
 | 
			
		||||
    if [[ "$(find "${frontend_in_challenge}" | wc -l)" -gt 2 ]];then
 | 
			
		||||
        cd "${frontend_in_challenge}"
 | 
			
		||||
    else
 | 
			
		||||
        cd "${FRONTEND_PATH}"
 | 
			
		||||
    fi
 | 
			
		||||
    yarn start
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user