This repository has been archived by the owner on Jun 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
6bf1fe3
commit 6899155
Showing
3 changed files
with
12 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1. 本地执行`npm version`更新版本 | ||
2. 推送`v`开头的tag到远程 | ||
3. 到github将release公开 |
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,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')); |