elastic / apm-agent-rum-js

https://www.elastic.co/guide/en/apm/agent/rum-js/current/index.html
MIT License
278 stars 133 forks source link

ci: fix the post-release and tag if core no tagged #1515

Closed v1v closed 3 months ago

v1v commented 3 months ago

The post-release step relied on the core component to be tagged already, if that was not the case then the post-release will fail with:

Get sha commit for @elastic/apm-rum-core@5.21.1
fatal: ambiguous argument '@elastic/apm-rum-core@5.21.1': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

To avoid the chicken/egg, it's gonna try to detect the commit for the core tag, otherwise, it will tag the core with the current workspace commit.

Oriignal implementation -> https://github.com/elastic/apm-agent-rum-js/pull/1479