-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
06111fe
commit 224ec99
Showing
9 changed files
with
145 additions
and
109 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,2 @@ | ||
github: [hananoshikayomaru] | ||
custom: https://www.buymeacoffee.com/yomaru |
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,11 +1,14 @@ | ||
{ | ||
"id": "md-image-caption", | ||
"name": "Markdown Image Caption", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"minAppVersion": "0.15.0", | ||
"description": "Generate image caption", | ||
"author": "Hananoshika Yomaru", | ||
"authorUrl": "https://yomaru.dev", | ||
"fundingUrl": "https://www.buymeacoffee.com/yomaru", | ||
"fundingUrl": { | ||
"buymeacoffee": "https://www.buymeacoffee.com/yomaru", | ||
"Github Sponsor": "https://github.com/sponsors/HananoshikaYomaru" | ||
}, | ||
"isDesktopOnly": false | ||
} |
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,57 +1,56 @@ | ||
{ | ||
"name": "obsidian-md-image-caption", | ||
"version": "1.0.4", | ||
"description": "Generate markdown based image captions for Obsidian", | ||
"main": "main.js", | ||
"scripts": { | ||
"dev": "bun esbuild.config.mjs", | ||
"build": "bun esbuild.config.mjs production", | ||
"version": "bun version-bump.mjs && git add manifest.json versions.json", | ||
"prepare": "husky install", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"keywords": [ | ||
"obsidian", | ||
"plugin", | ||
"dataview", | ||
"markdown", | ||
"generator", | ||
"javascript" | ||
], | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/diff-match-patch": "^1.0.34", | ||
"@types/js-yaml": "^4.0.6", | ||
"@types/node": "^16.11.6", | ||
"@typescript-eslint/eslint-plugin": "5.29.0", | ||
"@typescript-eslint/parser": "5.29.0", | ||
"builtin-modules": "3.3.0", | ||
"bun-types": "^1.0.3", | ||
"esbuild": "0.17.3", | ||
"husky": "^8.0.3", | ||
"obsidian": "latest", | ||
"tslib": "2.4.0", | ||
"typescript": "^5.0.5" | ||
}, | ||
"dependencies": { | ||
"diff-match-patch": "^1.0.5", | ||
"js-yaml": "^4.1.0", | ||
"mdast-util-from-markdown": "^1.2.0", | ||
"mdast-util-gfm-footnote": "^1.0.1", | ||
"mdast-util-gfm-task-list-item": "^1.0.1", | ||
"mdast-util-math": "^2.0.1", | ||
"micromark-extension-gfm-footnote": "^1.0.4", | ||
"micromark-extension-gfm-task-list-item": "^1.0.3", | ||
"micromark-extension-math": "^2.0.2", | ||
"micromark-util-combine-extensions": "^1.0.0", | ||
"quick-lru": "^6.1.1", | ||
"ts-dedent": "^2.2.0", | ||
"ts-pattern": "^5.0.5", | ||
"unist-util-visit": "^4.1.2", | ||
"@total-typescript/ts-reset": "^0.5.1", | ||
"obsidian-dataview": "^0.5.59", | ||
"safe-eval": "^0.4.1", | ||
"zod": "^3.22.2" | ||
} | ||
"name": "obsidian-md-image-caption", | ||
"version": "1.0.5", | ||
"description": "Generate markdown based image captions for Obsidian", | ||
"main": "main.js", | ||
"scripts": { | ||
"dev": "bun esbuild.config.mjs", | ||
"build": "bun esbuild.config.mjs production", | ||
"version": "bun version-bump.mjs && git add manifest.json versions.json", | ||
"prepare": "husky install", | ||
"release": "bash ./release.sh", | ||
"typecheck": "tsc --noEmit" | ||
}, | ||
"keywords": [ | ||
"obsidian", | ||
"plugin", | ||
"dataview", | ||
"markdown", | ||
"generator", | ||
"javascript" | ||
], | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/diff-match-patch": "^1.0.34", | ||
"@types/js-yaml": "^4.0.6", | ||
"@types/node": "^16.11.6", | ||
"@typescript-eslint/eslint-plugin": "5.29.0", | ||
"@typescript-eslint/parser": "5.29.0", | ||
"builtin-modules": "3.3.0", | ||
"bun-types": "^1.0.3", | ||
"esbuild": "0.17.3", | ||
"husky": "^8.0.3", | ||
"obsidian": "latest", | ||
"tslib": "2.4.0", | ||
"typescript": "^5.0.5" | ||
}, | ||
"dependencies": { | ||
"diff-match-patch": "^1.0.5", | ||
"js-yaml": "^4.1.0", | ||
"mdast-util-from-markdown": "^1.2.0", | ||
"mdast-util-gfm-footnote": "^1.0.1", | ||
"mdast-util-gfm-task-list-item": "^1.0.1", | ||
"mdast-util-math": "^2.0.1", | ||
"micromark-extension-gfm-footnote": "^1.0.4", | ||
"micromark-extension-gfm-task-list-item": "^1.0.3", | ||
"micromark-extension-math": "^2.0.2", | ||
"micromark-util-combine-extensions": "^1.0.0", | ||
"quick-lru": "^6.1.1", | ||
"ts-dedent": "^2.2.0", | ||
"unist-util-visit": "^4.1.2", | ||
"@total-typescript/ts-reset": "^0.5.1", | ||
"obsidian-dataview": "^0.5.59", | ||
"zod": "^3.22.2" | ||
} | ||
} |
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,66 @@ | ||
#!/bin/bash | ||
|
||
# Set the default update type | ||
UPDATE_TYPE="patch" | ||
|
||
# Parse command-line arguments | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
-m | --minor) | ||
UPDATE_TYPE="minor" | ||
shift | ||
;; | ||
-M | --major) | ||
UPDATE_TYPE="major" | ||
shift | ||
;; | ||
*) | ||
echo "Unknown option: $key" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Get the version number from manifest.json | ||
MANIFEST_VERSION=$(jq -r '.version' manifest.json) | ||
|
||
# Get the version number from package.json | ||
PACKAGE_VERSION=$(node -p -e "require('./package.json').version") | ||
|
||
# Ensure the version from package.json matches the version in manifest.json | ||
if [ "$PACKAGE_VERSION" != "$MANIFEST_VERSION" ]; then | ||
echo "Version mismatch between package.json and manifest.json" | ||
exit 1 | ||
fi | ||
|
||
# Increment the version based on the specified update type | ||
if [ "$UPDATE_TYPE" = "minor" ]; then | ||
NEW_VERSION=$(semver $PACKAGE_VERSION -i minor) | ||
elif [ "$UPDATE_TYPE" = "major" ]; then | ||
NEW_VERSION=$(semver $PACKAGE_VERSION -i major) | ||
else | ||
NEW_VERSION=$(semver $PACKAGE_VERSION -i patch) | ||
fi | ||
|
||
echo "Current version: $PACKAGE_VERSION" | ||
echo "New version: $NEW_VERSION" | ||
|
||
# Update the version in package.json | ||
jq --arg version "$NEW_VERSION" '.version = $version' package.json >tmp.json && mv tmp.json package.json | ||
echo "Changed package.json version to $NEW_VERSION" | ||
|
||
# Print the updated version of manifest.json using 'bun' | ||
bun run version | ||
echo "Updated version of manifest using bun. The current version of manifest.json is $(jq -r '.version' manifest.json)" | ||
|
||
# Create a git commit and tag | ||
git add . && git commit -m "release: $NEW_VERSION" | ||
git tag -a "$NEW_VERSION" -m "release: $NEW_VERSION" | ||
echo "Created tag $NEW_VERSION" | ||
|
||
# Push the commit and tag to the remote repository | ||
git push origin "$NEW_VERSION" | ||
echo "Pushed tag $NEW_VERSION to the origin branch $NEW_VERSION" | ||
git push | ||
echo "Pushed to the origin master branch" |
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
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
"1.0.1": "0.15.0", | ||
"1.0.2": "0.15.0", | ||
"1.0.3": "0.15.0", | ||
"1.0.4": "0.15.0" | ||
"1.0.4": "0.15.0", | ||
"1.0.5": "0.15.0" | ||
} |