chore: test submodule checkout to branch
This commit is contained in:
		
							parent
							
								
									573b94d896
								
							
						
					
					
						commit
						2864100e6b
					
				| 
						 | 
				
			
			@ -9,8 +9,8 @@ mkdir -p $submodules_dir
 | 
			
		|||
submodules=$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }')
 | 
			
		||||
for submodule in $submodules; do
 | 
			
		||||
    url=$(git config --file .gitmodules --get-regexp "submodule.$submodule.url" | awk '{ print $2 }')
 | 
			
		||||
    branch=$(git config --file .gitmodules --get-regexp "submodule.$submodule.branch" | awk '{ print $2 }')
 | 
			
		||||
    repo_name=$(echo $url | rev | cut -d'/' -f 1 | rev | cut -d'.' -f 1)
 | 
			
		||||
    commit=$(git submodule status $submodule | awk '{ print $1 }' | sed 's/^[+-]//')
 | 
			
		||||
    repo_dir="$tmp_dir/$repo_name"
 | 
			
		||||
    if [[ ! -v repo_names["$repo_name"] ]]; then
 | 
			
		||||
        if [ ! -d "$repo_dir" ]; then
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ for submodule in $submodules; do
 | 
			
		|||
    fi
 | 
			
		||||
    repo_names[$repo_name]=1
 | 
			
		||||
    cd $repo_dir
 | 
			
		||||
    git checkout -q $commit
 | 
			
		||||
    git checkout -q $branch
 | 
			
		||||
    cd -
 | 
			
		||||
    submodule_dir="$submodules_dir/$repo_name/$submodule"
 | 
			
		||||
    mkdir -p $submodule_dir
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user