Changelog script improvements
This commit is contained in:
		
							parent
							
								
									008598457d
								
							
						
					
					
						commit
						7558f4b161
					
				
					 1 changed files with 22 additions and 16 deletions
				
			
		
							
								
								
									
										20
									
								
								changelog.sh
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								changelog.sh
									
										
									
									
									
								
							| 
						 | 
					@ -7,29 +7,32 @@ LAST_RELEASE_TIMESTAMP="$(git log --format="%ct" -1 "${LAST_RELEASE_TAG}")"
 | 
				
			||||||
echo "Last release: ${LAST_RELEASE_TAG} at ${LAST_RELEASE_TIMESTAMP}"
 | 
					echo "Last release: ${LAST_RELEASE_TAG} at ${LAST_RELEASE_TIMESTAMP}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
REPOS=(
 | 
					REPOS=(
 | 
				
			||||||
    .
 | 
					    redox=.
 | 
				
			||||||
    cookbook
 | 
					    cookbook=cookbook
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for package in $(installer/target/release/redox_installer --list-packages -c config/x86_64/desktop.toml)
 | 
					for package in $(installer/target/release/redox_installer --list-packages -c config/x86_64/desktop.toml)
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
    REPOS+=("cookbook/recipes/${package}/source")
 | 
					    REPOS+=("${package}=cookbook/recipes/${package}/source")
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# TODO: resolve dependencies instead of manually adding these initfs packages
 | 
					# TODO: resolve dependencies instead of manually adding these initfs packages
 | 
				
			||||||
for package in init logd nulld ramfs randd zerod
 | 
					for package in init logd nulld ramfs randd zerod
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
    REPOS+=("cookbook/recipes/${package}/source")
 | 
					    REPOS+=("${package}=cookbook/recipes/${package}/source")
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for repo in "${REPOS[@]}"
 | 
					for name_repo in "${REPOS[@]}"
 | 
				
			||||||
do
 | 
					do
 | 
				
			||||||
 | 
					    name="$(echo "${name_repo}" | cut -d "=" -f 1)"
 | 
				
			||||||
 | 
					    repo="$(echo "${name_repo}" | cut -d "=" -f 2-)"
 | 
				
			||||||
 | 
					    echo -en "\x1B[1m${name}:\x1B[0m "
 | 
				
			||||||
 | 
					    if [ -e "${repo}/.git" ]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
        remote="$(git -C "${repo}" remote get-url origin)"
 | 
					        remote="$(git -C "${repo}" remote get-url origin)"
 | 
				
			||||||
        website="${remote%.*}"
 | 
					        website="${remote%.*}"
 | 
				
			||||||
    name="$(basename "${website}")"
 | 
					 | 
				
			||||||
        before="$(git -C "${repo}" log --until="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
 | 
					        before="$(git -C "${repo}" log --until="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
 | 
				
			||||||
        after="$(git -C "${repo}" log --since="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
 | 
					        after="$(git -C "${repo}" log --since="${LAST_RELEASE_TIMESTAMP}" --format="%h" -1)"
 | 
				
			||||||
    echo -en "\x1B[1m${name}:\x1B[0m "
 | 
					 | 
				
			||||||
        if [ -z "${before}" ]
 | 
					        if [ -z "${before}" ]
 | 
				
			||||||
        then
 | 
					        then
 | 
				
			||||||
            echo "New repository at ${website}"
 | 
					            echo "New repository at ${website}"
 | 
				
			||||||
| 
						 | 
					@ -39,4 +42,7 @@ do
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            echo "${website}/-/compare/${before}...${after}"
 | 
					            echo "${website}/-/compare/${before}...${after}"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        echo "Not a git repository"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue