File: .github/actions/composer/composer/install/run.sh

Recommend this page to a friend!
  Classes of Faris AL-Otaibi  >  PHP Sanitization Functions  >  .github/actions/composer/composer/install/run.sh  >  Download  
File: .github/actions/composer/composer/install/run.sh
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Sanitization Functions
Verify and clean values to assure they are valid
Author: By
Last change: Update of .github/actions/composer/composer/install/run.sh
Date: 2 months ago
Size: 566 bytes
 

 

Contents

Class file image Download
#!/usr/bin/env bash

dependencies="${COMPOSER_INSTALL_DEPENDENCIES}"

if [[ ${dependencies} == "lowest" ]]; then
  composer update --no-interaction --no-progress --prefer-lowest

  exit $?
fi

if [[ ${dependencies} == "locked" ]]; then
  composer install --no-interaction --no-progress

  exit $?
fi

if [[ ${dependencies} == "highest" ]]; then
  composer update --no-interaction --no-progress

  exit $?
fi

echo "::error::The value for the \"dependencies\" input needs to be one of \"lowest\", \"locked\"', \"highest\"' - got \"${dependencies}\" instead."

exit 1

For more information send a message to info at phpclasses dot org.