Small tool to update submodules to latest tags
This commit is contained in:
		
					parent
					
						
							
								fe3adeed4c
							
						
					
				
			
			
				commit
				
					
						f1b38c903a
					
				
			
		
					 1 changed files with 13 additions and 0 deletions
				
			
		
							
								
								
									
										13
									
								
								external/update_submodules.sh
									
										
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								external/update_submodules.sh
									
										
									
									
										vendored
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					#! /usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for dir in * ; do
 | 
				
			||||||
 | 
					    dir=${dir%*/}
 | 
				
			||||||
 | 
					    if [ -d "${dir}" ]; then
 | 
				
			||||||
 | 
					      echo "${dir}"
 | 
				
			||||||
 | 
					      cd "${dir}"
 | 
				
			||||||
 | 
					      latest_commit_with_tag=`git rev-list --tags --max-count=1`
 | 
				
			||||||
 | 
					      latest_tag=`git describe --tags ${latest_commit_with_tag}`
 | 
				
			||||||
 | 
					      git checkout "${latest_tag}"
 | 
				
			||||||
 | 
					      cd ..
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue