mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
chore(ci): remove sync-prerelease
script (#4486)
This commit is contained in:
parent
e39e2999e0
commit
66ed165773
@ -218,14 +218,12 @@
|
||||
"tauri-runtime": {
|
||||
"path": "./core/tauri-runtime",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-utils"],
|
||||
"postversion": "node ../../.scripts/covector/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
|
||||
"dependencies": ["tauri-utils"]
|
||||
},
|
||||
"tauri-runtime-wry": {
|
||||
"path": "./core/tauri-runtime-wry",
|
||||
"manager": "rust",
|
||||
"dependencies": ["tauri-utils", "tauri-runtime"],
|
||||
"postversion": "node ../../.scripts/covector/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
|
||||
"dependencies": ["tauri-utils", "tauri-runtime"]
|
||||
},
|
||||
"tauri-codegen": {
|
||||
"path": "./core/tauri-codegen",
|
||||
@ -277,8 +275,7 @@
|
||||
},
|
||||
"tauri-driver": {
|
||||
"path": "./tooling/webdriver",
|
||||
"manager": "rust",
|
||||
"postversion": "node ../../.scripts/covector/sync-prerelease.js ${ pkg.pkg } ${ release.type }"
|
||||
"manager": "rust"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
/*
|
||||
This script is solely intended to be run as part of the `covector version` step to
|
||||
keep the `tauri-runtime`, `tauri-runtime-wry` and `tauri-driver` crates version without the `beta` or `rc` suffix.
|
||||
*/
|
||||
|
||||
const {
|
||||
readFileSync,
|
||||
writeFileSync
|
||||
} = require('fs')
|
||||
|
||||
const packageNickname = process.argv[2]
|
||||
const bump = process.argv[3]
|
||||
|
||||
let manifestPath
|
||||
let dependencyManifestPaths
|
||||
let changelogPath
|
||||
|
||||
if (packageNickname === 'tauri-runtime') {
|
||||
manifestPath = '../../core/tauri-runtime/Cargo.toml'
|
||||
dependencyManifestPaths = [
|
||||
'../../core/tauri/Cargo.toml',
|
||||
'../../core/tauri-runtime-wry/Cargo.toml'
|
||||
]
|
||||
changelogPath = '../../core/tauri-runtime/CHANGELOG.md'
|
||||
} else if (packageNickname === 'tauri-runtime-wry') {
|
||||
manifestPath = '../../core/tauri-runtime-wry/Cargo.toml'
|
||||
dependencyManifestPaths = ['../../core/tauri/Cargo.toml']
|
||||
changelogPath = '../../core/tauri-runtime-wry/CHANGELOG.md'
|
||||
} else if (packageNickname === 'tauri-driver') {
|
||||
manifestPath = '../../tooling/webdriver/Cargo.toml'
|
||||
dependencyManifestPaths = []
|
||||
changelogPath = '../../tooling/webdriver/CHANGELOG.md'
|
||||
} else {
|
||||
throw new Error(`Unexpected package ${packageNickname}`)
|
||||
}
|
||||
|
||||
let manifest = readFileSync(manifestPath, 'utf-8')
|
||||
manifest = manifest.replace(
|
||||
/version = "(\d+\.\d+\.\d+)-[^0-9\.]+\.0"/,
|
||||
'version = "$1"'
|
||||
)
|
||||
writeFileSync(manifestPath, manifest)
|
||||
|
||||
let changelog = readFileSync(changelogPath, 'utf-8')
|
||||
changelog = changelog.replace(/(\d+\.\d+\.\d+)-[^0-9\.]+\.0/, '$1')
|
||||
writeFileSync(changelogPath, changelog)
|
||||
|
||||
for (const dependencyManifestPath of dependencyManifestPaths) {
|
||||
let dependencyManifest = readFileSync(dependencyManifestPath, 'utf-8')
|
||||
dependencyManifest = dependencyManifest.replace(
|
||||
new RegExp(
|
||||
packageNickname + ' = { version = "(\\d+\\.\\d+.\\d+)-[^0-9.]+.0"'
|
||||
),
|
||||
`${packageNickname} = { version = "$1"`
|
||||
)
|
||||
writeFileSync(dependencyManifestPath, dependencyManifest)
|
||||
}
|
Loading…
Reference in New Issue
Block a user