Skip to content

Commit 36cd6bc

Browse files
authored
docs(marketplace): use "vsce package" image URLs #3270
Everything is fine (>'')> BACKGROUND: `vsce package` always replaces *relative local* image paths with URLs: https://github.com/microsoft/vscode-vsce/blob/9478dbd11ea2e7adb23ec72923e889c7bb215263/src/package.ts#L885 For example, ![creds](./resources/marketplace/vscode/creds.gif) is replaced with: ![creds](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/resources/marketplace/vscode/creds.gif) PROBLEM: In the parent commit, before merging the PR, when I checked the URL: https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/creds.gif I wrongly thought the URL was "broken" (didn't know that `raw/HEAD/` was valid GitHub URL "syntax"). But after merging to mainline, the URL actually works and redirects to: https://raw.githubusercontent.com/aws/aws-toolkit-vscode/04baf36689134e48a4db4ffb1d97b16584388141/docs/marketplace/vscode/creds.gif SOLUTION: - Update the URLs to use the same format that would be forced by `vsce`: https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/… - This is more explicit and hopefully less confusing for other contributors. - Add a note in CONTRIBUTING.md
1 parent 04baf36 commit 36cd6bc

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,20 @@ As a simple example, let's say I wanted to add a new icon for CloudWatch log str
341341

342342
The Toolkit codebase contains logic in `src/dev/beta.ts` to support development during private betas. Creating a beta artifact requires a _stable_ URL to source Toolkit builds from. This URL should be added to `src/dev/config.ts`. Subsequent Toolkit artifacts will have their version set to `1.999.0` with a commit hash. Builds will automatically query the URL to check for a new build once a day and on every reload.
343343

344+
### VSCode Marketplace
345+
346+
The [marketplace page](https://marketplace.visualstudio.com/itemdetails?itemName=AmazonWebServices.aws-toolkit-vscode)
347+
is defined in `README.quickstart.vscode.md` (which replaces `README.md` during
348+
the release automation). The `vsce` package tool always [replaces relative image paths](https://github.com/microsoft/vscode-vsce/blob/9478dbd11ea2e7adb23ec72923e889c7bb215263/src/package.ts#L885)
349+
with URLs pointing to `HEAD` on GitHub (`https://github.com/aws/aws-toolkit-vscode/raw/HEAD/…/foo.gif`).
350+
351+
Note therefore:
352+
353+
1. Don't delete images from `docs/marketplace/` unless the _current published_
354+
AWS Toolkit release doesn't depend on them.
355+
2. `HEAD` implies that the URL depends on the current _default branch_ (i.e.
356+
`master`). Changes to other branches won't affect the marketplace page.
357+
344358
## Importing icons from other open source repos
345359

346360
If you are contribuing visual assets from other open source repos, the source repo must have a compatible license (such as MIT), and we need to document the source of the images. Follow these steps:

README.quickstart.vscode.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,57 @@ The AWS Toolkit lets you interact with AWS directly from VS Code. Ready to insta
1414

1515
Access AWS resources across your accounts and regions.
1616

17-
![creds](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/creds.gif)
17+
![creds](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/creds.gif)
1818

1919
### S3 support
2020

2121
View, create, and edit S3 buckets, folders, and files.
2222

23-
![S3](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/S3.gif)
23+
![S3](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/S3.gif)
2424

2525
### Download & upload Lambda functions
2626

27-
![download-Lambda](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/download-Lambda.gif)
27+
![download-Lambda](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/download-Lambda.gif)
2828

2929
## Troubleshoot AWS from the IDE
3030

3131
### Lambda
3232

3333
Step-through AWS Lambda functions using the VS Code debugger
3434

35-
![Lambda_step_through_debugging](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/Lambda_step_through_debugging.gif)
35+
![Lambda_step_through_debugging](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/Lambda_step_through_debugging.gif)
3636

3737
### CloudWatch Logs
3838

3939
Find logs generated by your AWS resources
4040

41-
![cw_logs](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/cw_logs.gif)
41+
![cw_logs](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/cw_logs.gif)
4242

4343
### ECS
4444

4545
Execute commands against running ECS containers (or open a terminal)
4646

47-
![ecs-terminal](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/ecs-terminal.gif)
47+
![ecs-terminal](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/ecs-terminal.gif)
4848

4949
## Write and edit code faster
5050

5151
### [Amazon CodeWhisperer](https://aws.amazon.com/codewhisperer/)
5252

5353
Build applications faster with automatic code recommendations based on the code and comments in VS Code.
5454

55-
![CodeWhisperer](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/codewhisperer.gif)
55+
![CodeWhisperer](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/codewhisperer.gif)
5656

5757
### [Amazon CodeCatalyst](https://aws.amazon.com/codecatalyst/)
5858

5959
Launch VS Code in a cloud development environment, powered by Amazon CodeCatalyst.
6060

61-
![CodeCatalyst](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/CC_dev_env.gif)
61+
![CodeCatalyst](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/CC_dev_env.gif)
6262

6363
### CloudFormation
6464

6565
Autocompletion and syntax support for CloudFormation templates
6666

67-
![cfn_autocompletion](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/cfn_autocompletion.gif)
67+
![cfn_autocompletion](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/cfn_autocompletion.gif)
6868

6969
## More features
7070

@@ -88,7 +88,7 @@ For a full list of features, visit [our documentation](https://docs.aws.amazon.c
8888
2. **CodeWhisperer** - connect using an AWS Builder ID or IAM Identity Center (formerly SSO)
8989
3. **CodeCatalyst** - connect using AWS Builder ID
9090

91-
![getting-started](https://raw.githubusercontent.com/aws/aws-toolkit-vscode/master/docs/marketplace/vscode/getting-started.gif)
91+
![getting-started](https://github.com/aws/aws-toolkit-vscode/raw/HEAD/docs/marketplace/vscode/getting-started.gif)
9292

9393
## Troubleshooting
9494

0 commit comments

Comments
 (0)