-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from 39zde/dev
v2.1.2
- Loading branch information
Showing
37 changed files
with
528 additions
and
755 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
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,13 +1,18 @@ | ||
# Frontend | ||
node_modules/ | ||
dist/ | ||
bundle-prod/ | ||
bundle-demo/ | ||
bundle-dev/ | ||
.DS_Store | ||
*.log* | ||
.yarn | ||
.perf/ | ||
!resources/data/*.sample.csv | ||
*.csv | ||
#a different index.html will be copied to root folder depending, on what package.json script is run | ||
index.html | ||
# Backend | ||
src-tauri/target/ | ||
src-tauri/gen/schemas | ||
*.csv | ||
!resources/data/*.sample.csv | ||
#a different tauri.conf.json will be copied to ./src-tauri/ folder, depending on what package.json script is run | ||
src-tauri/tauri.conf.json | ||
# other | ||
.DS_Store | ||
*.log* |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
enableTelemetry: 0 | ||
enableGlobalCache: false | ||
nmMode: "classic" | ||
nodeLinker: "node-modules" | ||
|
||
enableTelemetry: 0 | ||
|
||
nmMode: classic | ||
|
||
nodeLinker: node-modules |
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
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
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
# Screenshots | ||
|
||
![screenshot1](./contextMenu.png) | ||
![screenshot2](./settings.png) | ||
![screenshot3](./upload.png) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,86 @@ | ||
import { readFileSync, writeFileSync } from 'fs'; | ||
const args = process.argv; | ||
// relative to root | ||
const packageJsonPath = './package.json'; | ||
const cargoTomlPath = './src-tauri/Cargo.toml'; | ||
const tauriDevConfPath = './src-tauri/conf/tauri.dev.conf.json'; | ||
const tauriProdConfPath = './src-tauri/conf/tauri.prod.conf.json'; | ||
|
||
const version = { | ||
major: 0, | ||
minor: 0, | ||
patch: 0, | ||
}; | ||
|
||
const displayHelp = () => | ||
console.log( | ||
` | ||
upgradeVersion.js | ||
A help script to increase the the version numbers across all files | ||
Scheme: a.b.c | ||
--major overwrites --minor overwrites --patch | ||
==================================== | ||
-h --help Shows this message | ||
--usage | ||
-M --major Increase the version to [a+1].0.0 | ||
-m --minor Increase the version to a.[b+1].0 | ||
-p --patch Increase the version to a.b.[c+1] | ||
` | ||
); | ||
|
||
const versionJsonMatcher = /(?<=\"version\"\:[\s]{0,}\")[\d]{1,}\.[\d]{1,}\.[\d]{1,}(?=\"\,)/gm; | ||
const versionTomlMatcher = /(?<=version\s\=\s\")[\d]{1,}\.[\d]{1,}\.[\d]{1,}(?=\")/gm; | ||
|
||
function main() { | ||
if (args.includes('-h') || args.includes('--help') || args.includes('--usage')) { | ||
displayHelp(); | ||
} else { | ||
if ( | ||
args.includes('-M') || | ||
args.includes('-m') || | ||
args.includes('-p') || | ||
args.includes('--major') || | ||
args.includes('--minor') || | ||
args.includes('--patch') | ||
) { | ||
const packageJsonFile = readFileSync(packageJsonPath, 'utf8'); | ||
const currentVersion = packageJsonFile.match(versionJsonMatcher); | ||
if (currentVersion !== null) { | ||
const versions = currentVersion[0].split('.'); | ||
version.major = parseInt(versions[0]); | ||
version.minor = parseInt(versions[1]); | ||
version.patch = parseInt(versions[2]); | ||
if (args.includes('--patch') || args.includes('-p')) { | ||
version.patch += 1; | ||
} | ||
if (args.includes('--minor') || args.includes('-m')) { | ||
version.minor += 1; | ||
version.patch = 0; | ||
} | ||
if (args.includes('--major') || args.includes('-M')) { | ||
version.major += 1; | ||
version.minor = 0; | ||
version.patch = 0; | ||
} | ||
const newVersion = `${version.major}.${version.minor}.${version.patch}`; | ||
const newPackageJsonFile = packageJsonFile.replace(versionJsonMatcher, newVersion); | ||
writeFileSync(packageJsonPath, newPackageJsonFile, 'utf8'); | ||
const cargoTomlFile = readFileSync(cargoTomlPath, 'utf8'); | ||
const newTauriDevConfigFile = cargoTomlFile.replace(versionTomlMatcher, newVersion); | ||
writeFileSync(cargoTomlPath, newTauriDevConfigFile, 'utf8'); | ||
const tauriDevConfFile = readFileSync(tauriDevConfPath, 'utf8'); | ||
const newTauriDevConfFile = tauriDevConfFile.replace(versionJsonMatcher, newVersion); | ||
writeFileSync(tauriDevConfPath, newTauriDevConfFile, 'utf8'); | ||
const tauriProdConfFile = readFileSync(tauriProdConfPath, 'utf8'); | ||
const newTauriProdConfFile = tauriProdConfFile.replace(versionJsonMatcher, newVersion); | ||
writeFileSync(tauriProdConfPath, newTauriProdConfFile, 'utf8'); | ||
} | ||
} else { | ||
displayHelp(); | ||
} | ||
} | ||
} | ||
main(); |
Oops, something went wrong.