mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-31 07:16:22 +07:00 
			
		
		
		
	Sunset support for Ubuntu 16.04
This commit is contained in:
		| @ -55,6 +55,12 @@ export async function build( | ||||
|  */ | ||||
| export async function run(): Promise<void> { | ||||
|   try { | ||||
|     if ((await utils.readEnv('ImageOS')) == 'ubuntu16') { | ||||
|       core.setFailed( | ||||
|         'setup-php is not supported on Ubuntu 16.04. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452' | ||||
|       ); | ||||
|       return; | ||||
|     } | ||||
|     core.warning( | ||||
|       'setup-php v1 is deprecated.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2' | ||||
|     ); | ||||
| @ -67,11 +73,6 @@ export async function run(): Promise<void> { | ||||
|       ); | ||||
|       return; | ||||
|     } | ||||
|     if ((await utils.readEnv('ImageOS')) == 'ubuntu16') { | ||||
|       core.warning( | ||||
|         'setup-php will stop working on Ubuntu 16.04 from August 1, 2021. Please upgrade to Ubuntu 18.04 or Ubuntu 20.04 - https://setup-php.com/i/452' | ||||
|       ); | ||||
|     } | ||||
|     if (version) { | ||||
|       const os_version: string = process.platform; | ||||
|       // check the os version and run the respective script | ||||
|  | ||||
| @ -30,18 +30,10 @@ cleanup_lists() { | ||||
| # Function to add ppa:ondrej/php. | ||||
| add_ppa() { | ||||
|   ppa=${1:-ondrej/php} | ||||
|   if [ "$DISTRIB_RELEASE" = "16.04" ] && [ "$ppa" = "ondrej/php" ]; then | ||||
|     LC_ALL=C.UTF-8 sudo apt-add-repository --remove ppa:"$ppa" -y || true | ||||
|     LC_ALL=C.UTF-8 sudo apt-add-repository http://setup-php.com/ondrej/php/ubuntu -y | ||||
|     sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 4f4ea0aae5267a6c | ||||
|   elif ! apt-cache policy | grep -q "$ppa"; then | ||||
|   if ! apt-cache policy | grep -q "$ppa"; then | ||||
|     cleanup_lists "$(dirname "$ppa")" | ||||
|     LC_ALL=C.UTF-8 sudo apt-add-repository ppa:"$ppa" -y | ||||
|   fi | ||||
|  | ||||
|   if [ "$DISTRIB_RELEASE" = "16.04" ]; then | ||||
|     sudo "$debconf_fix" apt-get update | ||||
|   fi | ||||
| } | ||||
|  | ||||
| # Function to update the package lists. | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur