-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
949 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
import process from "process"; | ||
|
||
if (!process.env.CI) { | ||
console.log("Not running in CI, skipping. Please do not run this script manually!"); | ||
process.exit(0); | ||
} | ||
|
||
const GITHUB_RUN_ID = process.env.GITHUB_RUN_ID; | ||
const GITHUB_RUN_ATTEMPT = process.env.GITHUB_RUN_ATTEMPT; | ||
const GITHUB_REF_NAME = process.env.GITHUB_REF_NAME; | ||
|
||
const pkgJsonPath = path.resolve("./package.json"); | ||
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8")); | ||
const pkgVersion = pkgJson.version; | ||
|
||
// const tauriJsonPath = path.resolve("./src-tauri/tauri.conf.json"); | ||
const tauriJsonPath = path.resolve("./src-tauri/version.json"); | ||
const tauriJson = { | ||
version: `${pkgVersion}+${GITHUB_RUN_ID}${GITHUB_RUN_ATTEMPT}`, | ||
}; | ||
fs.writeFileSync(tauriJsonPath, JSON.stringify(tauriJson, null, 4)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
version.json |
Oops, something went wrong.