Skip to content

Commit

Permalink
build: shake useless codes
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Jul 13, 2024
1 parent dc37f24 commit 99eafd6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .changeset/quiet-coats-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noctisynth/grassator",
"private": true,
"private": false,
"version": "0.1.1",
"type": "module",
"scripts": {
Expand Down
12 changes: 1 addition & 11 deletions scripts/bump.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,15 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));

const cargoFilePath = path.join(__dirname, '../src-tauri/Cargo.toml');
const nodeFilePath = path.join(__dirname, '../src-tauri/package.json');
const workspaceFilePath = path.join(__dirname, '../package.json');

const cargoData = readFileSync(cargoFilePath, 'utf8');
const nodeData = readFileSync(nodeFilePath, 'utf8');
const workspaceData = readFileSync(workspaceFilePath, 'utf8');

const newVersion = JSON.parse(workspaceData).version;
const newCargoVersion = JSON.parse(nodeData).version;
const updatedData = cargoData.replace(
/version = ".*"/,
`version = "${newCargoVersion}"`
);

writeFileSync(cargoFilePath, updatedData, 'utf8');

// const nodeChangelogFilePath = path.join(__dirname, '../CHANGELOG.md');
// const nodeChangelogData = readFileSync(nodeChangelogFilePath, 'utf8');
// const cargoChangeLogFilePath = path.join(
// __dirname,
// '../src-tauri/CHANGELOG.md'
// );
// const cargoChangeLogData = readFileSync(cargoChangeLogFilePath, 'utf8');
execSync('cd src-tauri && cargo generate-lockfile', { stdio: 'inherit' });
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grassator",
"private": true,
"private": false,
"version": "0.1.1",
"type": "module",
"scripts": {
Expand Down

0 comments on commit 99eafd6

Please sign in to comment.