Scrcpy Mask v0.1.1

This commit is contained in:
AkiChase 2024-05-02 08:44:01 +08:00
parent 7090c64562
commit 991b02bc57
5 changed files with 33 additions and 12 deletions

View File

@ -60,8 +60,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: "app-${{ github.ref_name }}"
releaseName: "Scrcpy Mask ${{ github.ref_name }}"
releaseName: "Scrcpy Mask v__VERSION__"
releaseBody: "Add release notes here."
releaseDraft: true
prerelease: false

View File

@ -1,7 +1,7 @@
{
"name": "scrcpy-mask",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -14,23 +14,45 @@ process.stdin.on("data", function (data) {
process.stdin.pause();
console.log("publishing version: " + version);
console.log("update tauri.conf.json version");
const tauri_path = "./src-tauri/tauri.conf.json";
const tauri_lines = readFileSync(tauri_path, "utf8").split(
"\n"
);
for (let i = 0; i < tauri_lines.length; i++) {
if (tauri_lines[i].includes("version")) {
tauri_lines[i] = ` "version": "${version}",`;
break;
}
}
writeFileSync(tauri_path, tauri_lines.join("\n"));
console.log("update package.json version");
console.log(
execSync("pnpm version --no-git-tag-version " + version).toString()
);
console.log("update cargo.toml version\n");
const lines = readFileSync("./src-tauri/Cargo.toml", "utf8").split("\n");
for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith("version")) {
lines[i] = `version = "${version}"`;
const cargo_path = "./src-tauri/Cargo.toml";
const cargo_lines = readFileSync(cargo_path, "utf8").split(
"\n"
);
for (let i = 0; i < cargo_lines.length; i++) {
if (cargo_lines[i].startsWith("version")) {
cargo_lines[i] = `version = "${version}"`;
break;
}
}
writeFileSync("./src-tauri/Cargo.toml", lines.join("\n"));
writeFileSync(cargo_path, cargo_lines.join("\n"));
console.log("git commit and tag");
console.log(execSync(`git add . && git commit -m "Scrcpy Mask v${version}" && git tag v${version}`).toString());
console.log(
execSync(
`git add . && git commit -m "Scrcpy Mask v${version}" && git tag v${version}`
).toString()
);
console.log("Pleash push commit and tag to github manually:\ngit push && git push --tags");
console.log(
"Pleash push commit and tag to github manually:\ngit push && git push --tags"
);
});

View File

@ -1,6 +1,6 @@
[package]
name = "scrcpy-mask"
version = "0.1.0"
version = "0.1.1"
description = "A Tauri App"
authors = ["AkiChase"]
edition = "2021"

View File

@ -1,6 +1,6 @@
{
"productName": "scrcpy-mask",
"version": "0.0.0",
"version": "0.1.1",
"identifier": "com.akichase.mask",
"build": {
"beforeDevCommand": "pnpm dev",