Skip to content

Commit d090cde

Browse files
committed
feat: add updateUrl and use standardized plugin.exe-plugin file
1 parent 478d477 commit d090cde

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Get plugin file checksum
4444
if: startsWith(github.ref, 'refs/tags/')
4545
id: get_plugin_file_checksum
46-
run: echo "::set-output name=CHECKSUM::$(shasum -a 256 prettier.exe-plugin | awk '{print $1}')"
46+
run: echo "::set-output name=CHECKSUM::$(shasum -a 256 plugin.exe-plugin | awk '{print $1}')"
4747

4848
- name: Release
4949
uses: softprops/action-gh-release@v1
@@ -55,7 +55,7 @@ jobs:
5555
dprint-plugin-prettier-x86_64-apple-darwin.zip
5656
dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip
5757
dprint-plugin-prettier-x86_64-pc-windows-msvc.zip
58-
prettier.exe-plugin
58+
plugin.exe-plugin
5959
body: |
6060
## Install
6161

scripts/createForTesting.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# To run:
33
# 1. Change the one line to `reference": `./${zipFileName}`,` in scripts/createPluginFile.js
44
# 2. Run `./scripts/createForTesting.ps1`
5-
# 3. Update dprint.json to point at ./prettier.exe-plugin then update checksum
5+
# 3. Update dprint.json to point at ./plugin.exe-plugin then update checksum
66
# as shown when initially run.
77

88
$ErrorActionPreference = "Stop"

scripts/createPluginFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const outputFile = {
1515
"linux-x86_64": getPlatformObject("dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip"),
1616
"windows-x86_64": getPlatformObject("dprint-plugin-prettier-x86_64-pc-windows-msvc.zip"),
1717
};
18-
fs.writeFileSync("prettier.exe-plugin", JSON.stringify(outputFile, undefined, 2), { encoding: "utf8" });
18+
fs.writeFileSync("plugin.exe-plugin", JSON.stringify(outputFile, undefined, 2), { encoding: "utf8" });
1919

2020
function getPlatformObject(zipFileName) {
2121
const fileBytes = fs.readFileSync(zipFileName);

src/messageProcessor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ function getPluginInfo() {
186186
fileExtensions: getExtensions(),
187187
helpUrl: "https://dprint.dev/plugins/prettier",
188188
configSchemaUrl: "",
189+
updateUrl: "https://plugins.dprint.dev/dprint/dprint-plugin-prettier/latest.json",
189190
};
190191
}
191192

0 commit comments

Comments
 (0)