From 61b6ee2857b92721fc2c7e1329ae476a8d41f040 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Fri, 17 Feb 2023 20:31:51 -0600 Subject: [PATCH] Use helper script to bump khoj pre-release versions --- manifest.json | 16 ++++++++-------- src/interface/emacs/khoj.el | 2 +- src/interface/obsidian/manifest.json | 2 +- src/interface/obsidian/package.json | 2 +- src/interface/obsidian/versions.json | 3 ++- tools/bump_version.sh | 26 ++++++++++++++++++++++++++ versions.json | 7 ++++--- 7 files changed, 43 insertions(+), 15 deletions(-) create mode 100755 tools/bump_version.sh diff --git a/manifest.json b/manifest.json index 403af454..9c5f58f6 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { - "id": "khoj", - "name": "Khoj", - "version": "0.2.6", - "minAppVersion": "0.15.0", - "description": "Natural, Incremental Search for your Second Brain 🦅", - "author": "Debanjum Singh Solanky", - "authorUrl": "https://github.com/debanjum", - "isDesktopOnly": false + "id": "khoj", + "name": "Khoj", + "version": "0.3.0", + "minAppVersion": "0.15.0", + "description": "Natural, Incremental Search for your Second Brain 🦅", + "author": "Debanjum Singh Solanky", + "authorUrl": "https://github.com/debanjum", + "isDesktopOnly": false } diff --git a/src/interface/emacs/khoj.el b/src/interface/emacs/khoj.el index e526d33a..7b4c876f 100644 --- a/src/interface/emacs/khoj.el +++ b/src/interface/emacs/khoj.el @@ -5,7 +5,7 @@ ;; Author: Debanjum Singh Solanky ;; Description: Natural, Incremental Search for your Second Brain ;; Keywords: search, org-mode, outlines, markdown, beancount, ledger, image -;; Version: 0.3.0 +;; Version: 0.3.1 ;; Package-Requires: ((emacs "27.1") (transient "0.3.0")) ;; URL: https://github.com/debanjum/khoj/tree/master/src/interface/emacs diff --git a/src/interface/obsidian/manifest.json b/src/interface/obsidian/manifest.json index 9c5f58f6..2324bbd1 100644 --- a/src/interface/obsidian/manifest.json +++ b/src/interface/obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "khoj", "name": "Khoj", - "version": "0.3.0", + "version": "0.3.1", "minAppVersion": "0.15.0", "description": "Natural, Incremental Search for your Second Brain 🦅", "author": "Debanjum Singh Solanky", diff --git a/src/interface/obsidian/package.json b/src/interface/obsidian/package.json index 26442b50..8315dcaf 100644 --- a/src/interface/obsidian/package.json +++ b/src/interface/obsidian/package.json @@ -1,6 +1,6 @@ { "name": "Khoj", - "version": "0.3.0", + "version": "0.3.1", "description": "Natural, Incremental Search for your Second Brain 🦅", "main": "src/main.js", "scripts": { diff --git a/src/interface/obsidian/versions.json b/src/interface/obsidian/versions.json index 7b6560f4..29c440b8 100644 --- a/src/interface/obsidian/versions.json +++ b/src/interface/obsidian/versions.json @@ -2,5 +2,6 @@ "0.2.1": "0.15.0", "0.2.5": "0.15.0", "0.2.6": "0.15.0", - "0.3.0": "0.15.0" + "0.3.0": "0.15.0", + "0.3.1": "0.15.0" } diff --git a/tools/bump_version.sh b/tools/bump_version.sh new file mode 100755 index 00000000..7f75299f --- /dev/null +++ b/tools/bump_version.sh @@ -0,0 +1,26 @@ +#!/bin/zsh + +# Copy current version to project root +echo $PWD +cp src/interface/obsidian/versions.json . +cp src/interface/obsidian/manifest.json . + +# Induce hatch to compute next version number +# remove .dev[commits-since-tag] version suffix from hatch computed version number +next_version=$(touch bump.txt && git add bump.txt && hatch version | sed 's/\.dev.*//g') +git rm --cached -- bump.txt && rm bump.txt + +# Bump Obsidian plugins to next version +cd src/interface/obsidian +sed -E -i.bak "s/version\": \"(.*)\",/version\": \"$next_version\",/" package.json +sed -E -i.bak "s/version\": \"(.*)\"/version\": \"$next_version\"/" manifest.json +npm run version # updates versions.json +rm *.bak + +# Bump Emacs package to next version +cd ../emacs +sed -E -i.bak "s/^;; Version: (.*)/;; Version: $next_version/" khoj.el +rm *.bak + +# Restore State +cd ../../../ diff --git a/versions.json b/versions.json index 60c27358..7b6560f4 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,6 @@ { - "0.2.1": "0.15.0", - "0.2.5": "0.15.0", - "0.2.6": "0.15.0" + "0.2.1": "0.15.0", + "0.2.5": "0.15.0", + "0.2.6": "0.15.0", + "0.3.0": "0.15.0" }