Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to detect default GitHub branch #534

Closed
joaomoreno opened this issue Feb 15, 2021 · 2 comments · Fixed by #540
Closed

Try to detect default GitHub branch #534

joaomoreno opened this issue Feb 15, 2021 · 2 comments · Fixed by #540
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@joaomoreno
Copy link
Member

More and more people are changing their default branch from master to main. It would be great if VSCE could detect this and do right right thing when publishing an extension instead of assuming master.

@joaomoreno joaomoreno self-assigned this Feb 15, 2021
@joaomoreno joaomoreno added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Feb 15, 2021
@felipecrs
Copy link
Contributor

felipecrs commented Mar 1, 2021

My suggestion is:

$ git symbolic-ref refs/remotes/origin/HEAD
refs/remotes/origin/master

And it will work not only in GitHub.

@estruyf
Copy link

estruyf commented Mar 2, 2021

Another option is to use vsce publish --baseImagesUrl <URL to your repo>. This is how I fixed it.

IMO, it would be nice if this could be a setting in the package.json file. Like:

vsce: {
  "defaultBranch": "main"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants