- Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8)
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| 
 | |
| GREEN='\033[0;32m'
 | |
| RED='\033[0;31m'
 | |
| WHITE='\033[0;37m'
 | |
| RESET='\033[0m'
 | |
| 
 | |
| function validateVersion()
 | |
| {
 | |
|     echo ""
 | |
|     passedVersion=$1
 | |
|     echo -e "${WHITE}-- Validating tag '$passedVersion'...${RESET}"
 | |
| 
 | |
|     # Todo: validate the version here using a regex; if fail, just exit
 | |
|     #       ... expect 8.75.0, with no v in front of it
 | |
| 
 | |
|     if [[ $passedVersion == '' ]]; then
 | |
|         echo -e "\n-- Invalid tag. Tags should be structured without v; e.g. 8.57.0"
 | |
|         exit
 | |
|     fi
 | |
| 
 | |
|     echo -e "${WHITE}-- Tag valid.${RESET}"
 | |
|     echo ""
 | |
| }
 | |
| 
 | |
| # Exit script if any command fails (e.g. phpunit)
 | |
| set -e
 | |
| 
 | |
| 
 | |
| # Require confirmation it's set up corrctly
 | |
| echo 
 | |
| echo -e "${WHITE}-- This script is meant to be run after running upgrade.sh, BEFORE committing to Git.${RESET}"
 | |
| 
 | |
| while true; do
 | |
|     echo -e "${GREEN}-- Is that the current state of your local project?${RESET}"
 | |
|     read -p "-- (y/n) " yn
 | |
|     case $yn in
 | |
|         [Yy]* ) break;;
 | |
|         [Nn]* ) exit;;
 | |
|         * ) echo "Please answer y or n.";;
 | |
|     esac
 | |
| done
 | |
| 
 | |
| # Get the version and exit if not valid
 | |
| validateVersion $1
 | |
| 
 | |
| # Create official v prefaced version
 | |
| version="v$1"
 | |
| 
 | |
| # Run tests (and bail if they fail)
 | |
| phpunit
 | |
| echo -e "\n${WHITE}-- Tests succeeded.${RESET}"
 | |
| 
 | |
| # Branch
 | |
| echo -e "\n${WHITE}-- Creating a Git branch '$version-changes'...${RESET}\n"
 | |
| git checkout -b $version-changes
 | |
| 
 | |
| # Add and commit, with "v8.57.0 changes" as the commit name
 | |
| git add -A
 | |
| git commit -m "$version changes"
 | |
| 
 | |
| echo 
 | |
| echo -e "${WHITE}-- Git committed.${RESET}"
 | |
| 
 | |
| # Push
 | |
| git push -u origin $version-changes
 |