Skip to content

Commit

Permalink
✨ feat: Release v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nathonius committed Aug 31, 2024
1 parent df0f7e5 commit a1b0756
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 51 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!--
## [X.Y.Z] - YYYY-MM-DD
### Changed
### Fixed
-->

## [1.1.2] - 2024-08-30

### Changed

- Upgraded TypeScript, eslint, esbuild, and other dependency versions
- Automated built/lint checks on pull request
- Automated building of assets and drafting release

### Fixed

- Plugin no longer crashes on mobile
- Read time updates more reliably on file change

[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.1...HEAD
[1.1.2]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.1...v1.1.2
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ cp main.js manifest.json /path/to/your/vault/.obsidian/plugins/obsidian-reading-

- After all changes for the release are merged create a new branch for the release
- Update the changelog with new features and fixes
- Bump the plugin version in the following files:
- `manifest.json`
- `package.json`
- `versions.json`
- Run `npm install` to update the `package-lock.json`
- Run the `version-bump.mjs` script with the new version as an argument
- Commit all changed files and create a pull request
- After the pull request is merged, create a new annotated tag for the release:

Expand Down
18 changes: 9 additions & 9 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "obsidian-reading-time",
"name": "Reading Time",
"description": "Add the current note's reading time to Obsidian's status bar.",
"version": "1.1.1",
"minAppVersion": "0.12.17",
"isDesktopOnly": false,
"author": "avr",
"authorUrl": "https://github.com/avr"
{
"id": "obsidian-reading-time",
"name": "Reading Time",
"description": "Add the current note's reading time to Obsidian's status bar.",
"version": "1.1.2",
"minAppVersion": "0.12.17",
"isDesktopOnly": false,
"author": "avr",
"authorUrl": "https://github.com/avr"
}
60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"name": "obsidian-reading-time",
"author": "Aaron Van Ruler <aaron@avr.io>",
"version": "1.1.1",
"description": "Add the current note's reading time to Obsidian's status bar.",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "node esbuild.config.mjs production",
"lint": "eslint src/"
},
"keywords": [
"obsidian-md"
],
"license": "MIT",
"devDependencies": {
"@eslint/js": "^9.1.1",
"@types/node": "^20.11.19",
"builtin-modules": "^3.3.0",
"esbuild": "0.20.0",
"eslint": "^8.57.0",
"obsidian": "latest",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0"
},
"dependencies": {
"pretty-ms": "^7.0.1",
"reading-time": "^1.5.0"
}
}
"name": "obsidian-reading-time",
"author": "Aaron Van Ruler <aaron@avr.io>",
"version": "1.1.2",
"description": "Add the current note's reading time to Obsidian's status bar.",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "node esbuild.config.mjs production",
"lint": "eslint src/"
},
"keywords": [
"obsidian-md"
],
"license": "MIT",
"devDependencies": {
"@eslint/js": "^9.1.1",
"@types/node": "^20.11.19",
"builtin-modules": "^3.3.0",
"esbuild": "0.20.0",
"eslint": "^8.57.0",
"obsidian": "latest",
"tslib": "^2.6.2",
"typescript": "^5.4.5",
"typescript-eslint": "^7.7.0"
},
"dependencies": {
"pretty-ms": "^7.0.1",
"reading-time": "^1.5.0"
}
}
30 changes: 30 additions & 0 deletions version-bump.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import fs from "fs";
import { execSync } from "child_process";

const version = process.argv[2];

if (!version) {
console.error("Please provide a version number as a command line argument.");
process.exit(1);
}

// Update package.json
const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
packageJson.version = version;
fs.writeFileSync("package.json", JSON.stringify(packageJson, null, "\t"));

// Update manifest.json
const manifestJson = JSON.parse(fs.readFileSync("manifest.json", "utf8"));
manifestJson.version = version;
fs.writeFileSync("manifest.json", JSON.stringify(manifestJson, null, "\t"));

// Update versions.json
const versionsJson = JSON.parse(fs.readFileSync("versions.json", "utf8"));
const hostSoftwareVersion = Object.values(versionsJson)[0]; // Assuming the first entry is the previous version
const newVersionsJson = { [version]: hostSoftwareVersion, ...versionsJson };
fs.writeFileSync("versions.json", JSON.stringify(newVersionsJson, null, "\t"));

// Update package-lock.json by running npm install
execSync("npm install", { stdio: "inherit" });

console.log("Version updated successfully.");
15 changes: 8 additions & 7 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"1.0.0": "0.9.7",
"1.0.1": "0.9.7",
"1.0.2": "0.9.7",
"1.0.3": "0.9.7",
"1.0.4": "0.9.7",
"1.1.0": "0.12.17",
"1.1.1": "0.12.17"
"1.1.2": "0.9.7",
"1.0.0": "0.9.7",
"1.0.1": "0.9.7",
"1.0.2": "0.9.7",
"1.0.3": "0.9.7",
"1.0.4": "0.9.7",
"1.1.0": "0.12.17",
"1.1.1": "0.12.17"
}

0 comments on commit a1b0756

Please sign in to comment.