Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
chore: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eightHundreds committed Jul 15, 2023
1 parent 6bf1fe3 commit 6899155
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. 本地执行`npm version`更新版本
2. 推送`v`开头的tag到远程
3. 到github将release公开
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-dida-sync",
"version": "1.2.3",
"version": "1.3.0",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
Expand Down
16 changes: 8 additions & 8 deletions version-bump.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { readFileSync, writeFileSync } from "fs";
import {readFileSync, writeFileSync} from 'fs';

const targetVersion = process.env.npm_package_version;

// read minAppVersion from manifest.json and bump version to target version
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
const { minAppVersion } = manifest;
// Read minAppVersion from manifest.json and bump version to target version
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
const {minAppVersion} = manifest;
manifest.version = targetVersion;
writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t"));
writeFileSync('manifest.json', JSON.stringify(manifest, null, '\t'));

// update versions.json with target version and minAppVersion from manifest.json
let versions = JSON.parse(readFileSync("versions.json", "utf8"));
// Update versions.json with target version and minAppVersion from manifest.json
const versions = JSON.parse(readFileSync('versions.json', 'utf8'));
versions[targetVersion] = minAppVersion;
writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));
writeFileSync('versions.json', JSON.stringify(versions, null, '\t'));

0 comments on commit 6899155

Please sign in to comment.