Skip to content

Commit ee0b53f

Browse files
authored
skip pack in publish, use check fetch (#10657)
* skip pack in publish, use check fetch * remove script * remove apt, exists in main pipeline * CLI doesn't need separate check * no assets for tauri-cli
1 parent 23a912b commit ee0b53f

File tree

2 files changed

+26
-95
lines changed

2 files changed

+26
-95
lines changed

.changes/config.json

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
"pkgManagers": {
1515
"rust": {
1616
"version": true,
17-
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js cargo ${ pkgFile.pkg.package.name } ${ pkgFile.pkg.package.version }",
17+
"getPublishedVersion": {
18+
"use": "fetch:check",
19+
"options": {
20+
"url": "https://crates.io/api/v1/crates/${ pkg.pkgFile.pkg.package.name }/${ pkg.pkgFile.version }"
21+
}
22+
},
1823
"prepublish": [
19-
"sudo apt-get update",
20-
"sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev",
2124
"cargo install cargo-audit --features=fix",
2225
{
2326
"command": "cargo generate-lockfile",
@@ -43,11 +46,6 @@
4346
}
4447
],
4548
"publish": [
46-
"sleep 15s",
47-
{
48-
"command": "cargo package --no-verify",
49-
"dryRunCommand": true
50-
},
5149
{
5250
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
5351
"dryRunCommand": true,
@@ -64,21 +62,22 @@
6462
"pipe": true
6563
}
6664
],
67-
"postpublish": [
68-
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
69-
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
70-
"git push --tags -f"
71-
],
72-
"assets": [
73-
{
74-
"path": "./target/package/${ pkg.pkg }-${ pkgFile.version }.crate",
75-
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
76-
}
77-
]
65+
"postpublish": {
66+
"use": "fetch:check",
67+
"options": {
68+
"url": "https://crates.io/api/v1/crates/${ pkg.pkgFile.pkg.package.name }/${ pkg.pkgFile.version }"
69+
},
70+
"retries": [5000, 5000, 5000]
71+
}
7872
},
7973
"javascript": {
8074
"version": true,
81-
"getPublishedVersion": "node ../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
75+
"getPublishedVersion": {
76+
"use": "fetch:check",
77+
"options": {
78+
"url": "https://registry.npmjs.com/${ pkg.pkgFile.pkg.name }/${ pkg.pkgFile.version }"
79+
}
80+
},
8281
"prepublish": [
8382
{
8483
"command": "pnpm i --frozen-lockfile",
@@ -99,14 +98,9 @@
9998
"command": "echo '```\n\n</details>\n'",
10099
"dryRunCommand": true,
101100
"pipe": true
102-
},
103-
{
104-
"command": "npm pack",
105-
"dryRunCommand": true
106101
}
107102
],
108103
"publish": [
109-
"sleep 15s",
110104
{
111105
"command": "echo '<details>\n<summary><em><h4>PNPM Publish</h4></em></summary>\n\n```'",
112106
"dryRunCommand": true,
@@ -123,11 +117,13 @@
123117
"pipe": true
124118
}
125119
],
126-
"postpublish": [
127-
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor } -f",
128-
"git tag ${ pkg.pkg }-v${ pkgFile.versionMajor }.${ pkgFile.versionMinor } -f",
129-
"git push --tags -f"
130-
]
120+
"postpublish": {
121+
"use": "fetch:check",
122+
"options": {
123+
"url": "https://registry.npmjs.com/${ pkg.pkgFile.pkg.name }/${ pkg.pkgFile.version }"
124+
},
125+
"retries": [5000, 5000, 5000]
126+
}
131127
}
132128
},
133129
"packages": {
@@ -253,7 +249,6 @@
253249
"@tauri-apps/cli": {
254250
"path": "./tooling/cli/node",
255251
"manager": "javascript",
256-
"getPublishedVersion": "node ../../../.scripts/covector/package-latest-version.js npm ${ pkgFile.pkg.name } ${ pkgFile.pkg.version }",
257252
"dependencies": ["tauri-cli"],
258253
"postversion": [
259254
"node ../../../.scripts/covector/sync-cli-metadata.js ${ pkg.pkg } ${ release.type }",
@@ -270,12 +265,6 @@
270265
"postversion": [
271266
"cargo check",
272267
"cargo build --manifest-path ../../core/tauri-config-schema/Cargo.toml"
273-
],
274-
"assets": [
275-
{
276-
"path": "${ pkg.path }/target/package/tauri-cli-${ pkgFile.version }.crate",
277-
"name": "${ pkg.pkg }-${ pkgFile.version }.crate"
278-
}
279268
]
280269
},
281270
"tauri-driver": {

.scripts/covector/package-latest-version.js

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)