adobe / adobe/helix-cli

Cannot use semantic release in my project

Open
#2,280 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
68
Forks
72
Avg merge
1d 3h
Merged PRs (30d)
8

Description

Create a project, setup semantic release and release a version. A shortcut is to create project and create a git tag+release with name `v1.0.0` on the latest commit.
Just clone the project (stay on the `main` branch) and run `aem up`. This crashes pretty quickly with error:

```
Hostname/IP does not match certificate's altnames: Host: v1.0.0--my-helix-project--adobe.hlx.page. is not in the cert's altnames: DNS:developer.adobe.com, DNS:www.adobe.io, DNS:adobe.io, DNS:udp.adobe.io, DNS:*.developer.adobe.com, DNS:dev.adobe.com, DNS:*.adobe.io, DNS:developers.adobe.com, DNS:*.developers.adobe.com, DNS:www.developer.adobe.com, DNS:www.developers.adobe.com
```

![image](https://github.com/adobe/helix-cli/assets/474200/a388b83b-711c-4a14-845c-a5d330867c29)

A quick inspection took me to: https://github.com/adobe/helix-cli/blob/main/src/git-utils.js#L151-L163
The `tag` is returned because it matches the `commit sha` instead of the `main` branch. And of course `v.1.0.0` is not valid in the subdomain host.

3 options:
1. get rid of the tag logic - not sure when we would need it... the probability that the tag name contains a dot is pretty high
2. move the branch logic before the tag logic - if you are in a valid branch, no need to check for something else
3. document we do not support semantic-release at project level

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.