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

copy package.json to staging directory #654

Closed
wants to merge 3 commits into from

Conversation

danfiedler-msft
Copy link
Contributor

No description provided.

@danfiedler-msft danfiedler-msft requested a review from gfs November 5, 2024 19:52
Copy link
Contributor

@gfs gfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the correct approach. The package.json is required as a component of the vsix and should be read out of it. I think the error actually means that it isn't finding the vsix to publish.

Additionally, we've found that its necessary to manually mark pre-release versions with vsce with a special flag, or else they will clobber all stable release versions.

See

- task: PowerShell@2
displayName: Publish Pre-Release / Release
inputs:
targetType: 'inline'
script: |
$packPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix
if ("$(ReleaseVersion)".Contains("-"))
{
echo "Publishing as --pre-release = $(ReleaseVersion)"
vsce publish --packagePath $packPath --pat $(VS_Token) --pre-release
}
else
{
echo "Publishing as official release = $(ReleaseVersion)"
vsce publish --packagePath $packPath --pat $(VS_Token)
}
for previous publish action using package path and switching on release/pre-release.

@danfiedler-msft
Copy link
Contributor Author

I don't think this is the correct approach. The package.json is required as a component of the vsix and should be read out of it. I think the error actually means that it isn't finding the vsix to publish.

Updated the publish step to bring back release vs. prerelease. Added a step to list the contents of the staging directory.

I know from the signing step the VSIX exists prior to the move from binaries to staging.

Signed file: D:\a_work\1\b\Unsigned_Plugin\vscode-devskim-1.0.45.vsix

I think the move should work so it will be surprising if the VSIX isn't in the expected spot for publishing.

@danfiedler-msft danfiedler-msft requested a review from gfs November 6, 2024 21:17
@danfiedler-msft danfiedler-msft deleted the danfiedler-msft/vscode-release branch November 6, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants