mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-10-31 02:52:56 +00:00 
			
		
		
		
	Implement auto release support in tfw.sh
This commit is contained in:
		
							
								
								
									
										16
									
								
								hack/tfw.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								hack/tfw.sh
									
									
									
									
									
								
							| @@ -24,6 +24,18 @@ run_frontend() | |||||||
|     yarn start |     yarn start | ||||||
| } | } | ||||||
|  |  | ||||||
|  | release_baseimage() | ||||||
|  | { | ||||||
|  |     cd $BASEIMAGE_PATH | ||||||
|  |     TAG="$(baseimage_releasename)" | ||||||
|  |     read -p "Tag and push new TFW version \"${TAG}\"? [y/N]" -r && echo | ||||||
|  |     if [[ $REPLY =~ ^(y|Y|yes|Yes|YES)$ ]] | ||||||
|  |     then | ||||||
|  |         git tag -s -m "$1" "$TAG" | ||||||
|  |         git push origin $TAG | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  |  | ||||||
| build_baseimage() | build_baseimage() | ||||||
| { | { | ||||||
|     cd $BASEIMAGE_PATH |     cd $BASEIMAGE_PATH | ||||||
| @@ -84,11 +96,15 @@ case $1 in | |||||||
|     buildstart) |     buildstart) | ||||||
|         build_and_start_tfw |         build_and_start_tfw | ||||||
|     ;; |     ;; | ||||||
|  |     release) | ||||||
|  |         release_baseimage | ||||||
|  |     ;; | ||||||
|     *) |     *) | ||||||
|         echo "Usage: tfw.sh [buildtfw|build|start|buildstart]" |         echo "Usage: tfw.sh [buildtfw|build|start|buildstart]" | ||||||
|         echo "          |--- buildtfw:   build TFW baseimage" |         echo "          |--- buildtfw:   build TFW baseimage" | ||||||
|         echo "          |--- build:      build TFW test" |         echo "          |--- build:      build TFW test" | ||||||
|         echo "          |--- start:      start TFW test" |         echo "          |--- start:      start TFW test" | ||||||
|         echo "          |--- buildstart: build all, then start TFW test" |         echo "          |--- buildstart: build all, then start TFW test" | ||||||
|  |         echo "          |--- release:    tag TFW baseimage and push to upstream" | ||||||
|     ;; |     ;; | ||||||
| esac | esac | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user