create_release.sh 914 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/zsh
  2. if [ -z "$1" ]; then
  3. echo "abort - parameter is empty"
  4. exit
  5. fi
  6. set -euo pipefail
  7. SCRIPT_PATH=$(readlink -f "$0")
  8. SCRIPT_DIR=$(dirname "$SCRIPT_PATH")
  9. (
  10. set -euo pipefail
  11. cd "$SCRIPT_DIR" || exit
  12. echo "tag: $1"
  13. git tag "$1"
  14. git push origin
  15. git push origin "$1"
  16. git push github
  17. git push github "$1"
  18. git push gitlab
  19. git push gitlab "$1"
  20. git push gitea
  21. git push gitea "$1"
  22. echo ""
  23. release_title="Release version $1"
  24. echo "$release_title"
  25. echo ""
  26. release_message="$(git log --format=%B -n 1 "$1")"
  27. echo "$release_message"
  28. release_file="../ffupdater/release/ffupdater-release.apk"
  29. echo "create release on GitHub:"
  30. gh release create "$1" "$release_file" --notes "$release_message" --title "$release_title"
  31. echo "create release on GitLab:"
  32. glab release create "$1" "$release_file" --notes "$release_message" --name "$release_title"
  33. startrepomaker
  34. )