Vscode-vsce: Rewrite GitHub links to exact commit, not latest master

Created on 3 Apr 2016  路  6Comments  路  Source: microsoft/vscode-vsce

I recently added a new demo GIF to my debug adapter, without publishing a new release. I was surprised to see the new GIF already showing up in the VS Code marketplace, even though it is still the old README. Then I looked inside the vsix file and saw that vsce changed the relative link to the GIF to

![Demo GIF](https://github.com/felixfbecker/vscode-php-debug/raw/master/images/demo.gif)

which means the demo GIF will always use the latest master. If I would make a commit that deletes the image it would completely break the marketplace appearance with a 404. The GIF is actually showing new features that are not available in the version in the marketplace, so it is misleading aswell...

Instead, the link should have been rewritten to
https://raw.githubusercontent.com/felixfbecker/vscode-php-debug/137d4d6ca58393b05bac6dc41a54a8c4f1b1c6c1/images/demo.gif
(exact commit of v1.5.1)

feature-request help wanted

Most helpful comment

Correct. That is btw the way npm version behaves too. You cannot run it when your working directory is dirty.

All 6 comments

@joaomoreno would change these lines to have current commit sha be enough to fix the links?

I guess it would yes!

@felixfbecker This is shaky ground. It would involve not allowing users to run vsce publish if their repository has anything dirty, since vsce wouldn't be able to know which would be the commit ID of the current changes.

Correct. That is btw the way npm version behaves too. You cannot run it when your working directory is dirty.

Let's do it then!

vsce should not be defaulting to a branch named "master".

I eventually found the --githubBranch flag, which is not documented.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SamVerschueren picture SamVerschueren  路  5Comments

equinusocio picture equinusocio  路  4Comments

brandoncc picture brandoncc  路  6Comments

true0r picture true0r  路  3Comments

joaomoreno picture joaomoreno  路  6Comments