You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

set-version.sh 870 B

2 years ago
12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # Sets the Yarn version number in _config.yml
  3. set -ex
  4. if [ -z "$YARN_VERSION" -o -z "$YARN_RC" ]; then
  5. echo 'Please provide YARN_VERSION and YARN_RC environment variables.'
  6. echo 'YARN_RC should be "true" to release an RC build.'
  7. exit 1
  8. fi
  9. configFile=`dirname $0`/../_config.yml
  10. if [ "$YARN_RC" = "true" ]; then
  11. sed -i -e "s/latest_rc_version:.\+/latest_rc_version: $YARN_VERSION/" "$configFile"
  12. sed -i -e 's/show_rc:.\+/show_rc: true/' "$configFile"
  13. else
  14. sed -i -e "s/latest_version:.\+/latest_version: $YARN_VERSION/" "$configFile"
  15. # If the stable version is newer than the latest RC, we should hide the RC
  16. latestRCVersion=`grep -oP 'latest_rc_version: \K([0-9\.]+)' "$configFile"`
  17. ! dpkg --compare-versions $latestRCVersion le $YARN_VERSION
  18. if [ $? -ne 0 ]; then
  19. sed -i -e 's/show_rc:.\+/show_rc: false/' "$configFile"
  20. fi;
  21. fi

js yarn包管理组件依赖分析

Contributors (1)