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

18 lines
614 B

  1. #!/bin/bash
  2. set -e
  3. version_from_galaxy=$(grep "^version:" galaxy.yml | awk '{print $2}')
  4. version_from_docs=$(grep -P "^\s+version:\sv\d+\.\d+\.\d+" docs/ansible_collection.md | awk '{print $2}')
  5. if [[ $KUBESPRAY_VERSION != "v${version_from_galaxy}" ]]
  6. then
  7. echo "Please update galaxy.yml version to match the KUBESPRAY_VERSION. Be sure to remove the \"v\" to adhere"
  8. echo "to semenatic versioning"
  9. exit 1
  10. fi
  11. if [[ $KUBESPRAY_VERSION != "${version_from_docs}" ]]
  12. then
  13. echo "Please update the documentation for Ansible collections under docs/ansible_collection.md to reflect the KUBESPRAY_VERSION"
  14. exit 1
  15. fi