Use helper script to bump khoj pre-release versions

This commit is contained in:
Debanjum Singh Solanky 2023-02-17 20:31:51 -06:00
parent 47c2cc63e1
commit 61b6ee2857
7 changed files with 43 additions and 15 deletions

View file

@ -1,10 +1,10 @@
{ {
"id": "khoj", "id": "khoj",
"name": "Khoj", "name": "Khoj",
"version": "0.2.6", "version": "0.3.0",
"minAppVersion": "0.15.0", "minAppVersion": "0.15.0",
"description": "Natural, Incremental Search for your Second Brain 🦅", "description": "Natural, Incremental Search for your Second Brain 🦅",
"author": "Debanjum Singh Solanky", "author": "Debanjum Singh Solanky",
"authorUrl": "https://github.com/debanjum", "authorUrl": "https://github.com/debanjum",
"isDesktopOnly": false "isDesktopOnly": false
} }

View file

@ -5,7 +5,7 @@
;; Author: Debanjum Singh Solanky <debanjum@gmail.com> ;; Author: Debanjum Singh Solanky <debanjum@gmail.com>
;; Description: Natural, Incremental Search for your Second Brain ;; Description: Natural, Incremental Search for your Second Brain
;; Keywords: search, org-mode, outlines, markdown, beancount, ledger, image ;; 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")) ;; Package-Requires: ((emacs "27.1") (transient "0.3.0"))
;; URL: https://github.com/debanjum/khoj/tree/master/src/interface/emacs ;; URL: https://github.com/debanjum/khoj/tree/master/src/interface/emacs

View file

@ -1,7 +1,7 @@
{ {
"id": "khoj", "id": "khoj",
"name": "Khoj", "name": "Khoj",
"version": "0.3.0", "version": "0.3.1",
"minAppVersion": "0.15.0", "minAppVersion": "0.15.0",
"description": "Natural, Incremental Search for your Second Brain 🦅", "description": "Natural, Incremental Search for your Second Brain 🦅",
"author": "Debanjum Singh Solanky", "author": "Debanjum Singh Solanky",

View file

@ -1,6 +1,6 @@
{ {
"name": "Khoj", "name": "Khoj",
"version": "0.3.0", "version": "0.3.1",
"description": "Natural, Incremental Search for your Second Brain 🦅", "description": "Natural, Incremental Search for your Second Brain 🦅",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View file

@ -2,5 +2,6 @@
"0.2.1": "0.15.0", "0.2.1": "0.15.0",
"0.2.5": "0.15.0", "0.2.5": "0.15.0",
"0.2.6": "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"
} }

26
tools/bump_version.sh Executable file
View file

@ -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 ../../../

View file

@ -1,5 +1,6 @@
{ {
"0.2.1": "0.15.0", "0.2.1": "0.15.0",
"0.2.5": "0.15.0", "0.2.5": "0.15.0",
"0.2.6": "0.15.0" "0.2.6": "0.15.0",
"0.3.0": "0.15.0"
} }