^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$
- Semantic versioning http://semver.org/
- Source of the regex npm/node-semver#32
| #!/bin/bash | |
| # Copyright (C) 2025 Jim Chen, licensed under GPL-3.0-or-later | |
| # | |
| # This script is rewritten from the solutions provided in the following comments, credited to Sergei von Alis(gasinvein) and Zihad(tazihad): | |
| # - https://github.com/keepassxreboot/keepassxc-browser/issues/1631#issuecomment-1153736766 | |
| # - https://github.com/keepassxreboot/keepassxc-browser/issues/1631#issuecomment-1170629567 | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or |
| # TODO: replace :token, :user, and :repo | |
| curl -H "Authorization: token :token" \ | |
| -H 'Accept: application/vnd.github.everest-preview+json' \ | |
| "https://api.github.com/repos/:user/:repo/dispatches" \ | |
| -d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}' |
^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$