Skip to content

Commit

Permalink
Modernize build; drop special handling for Escape
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Oct 23, 2022
1 parent d690c8b commit 50de622
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 53 deletions.
45 changes: 4 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- uses: pnpm/[email protected]
- uses: actions/checkout@v3
- uses: ophidian-lib/build@v1
with:
version: 6.32.19
- name: Create release and Upload
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
run: |
PLUGIN_NAME=$(jq -r .id manifest.json)
PLUGIN_NAME=${PLUGIN_NAME:-${GITHUB_REPOSITORY##*/}}
TAG_NAME=${GITHUB_REF##*/}
MANIFEST_VERSION=$(jq -r .version manifest.json)
if [[ "$MANIFEST_VERSION" != "$TAG_NAME" ]]; then
echo "ERROR: Commit is tagged '$TAG_NAME' but manifest version is '$MANIFEST_VERSION'"
exit 1
fi
pnpm install
pnpm build
rm -f dist/main.css
mkdir "${PLUGIN_NAME}"
assets=()
for f in main.js manifest*.json styles.css; do
if [[ -f dist/$f ]] && [[ ! -f $f ]]; then
mv dist/$f $f;
fi
if [[ -f $f ]]; then
cp $f "${PLUGIN_NAME}/"
assets+=(-a "$f")
fi
done
zip -r "$PLUGIN_NAME".zip "$PLUGIN_NAME"
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" -m "### $COMMIT_MESSAGE" "$TAG_NAME"
token: ${{ secrets.GITHUB_TOKEN }}
release-notes: ${{ github.event.commits[0].message }}
6 changes: 4 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"id": "tag-wrangler",
"name": "Tag Wrangler",
"version": "0.5.3",
"minAppVersion": "0.13.19",
"author": "PJ Eby",
"authorUrl": "https://github.com/pjeby",
"version": "0.5.4",
"minAppVersion": "0.15.9",
"description": "Rename, merge, toggle, and search tags from the tag pane",
"isDesktopOnly": true
}
10 changes: 0 additions & 10 deletions src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,6 @@ export default class TagWrangler extends Plugin {
random = this.app.plugins.plugins["smart-random-note"],
menu = e.obsidian_contextmenu.addItem(item("pencil", "Rename #"+tagName, () => this.rename(tagName)));

menu.register(
onElement(document, "keydown", "*", e => {
if (e.key==="Escape") {
e.preventDefault();
e.stopPropagation();
menu.hide();
}
}, {capture: true})
);

menu.addSeparator();
if (tagPage) {
menu.addItem(
Expand Down
1 change: 1 addition & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"0.5.4": "0.15.9",
"0.5.3": "0.14.5",
"0.5.2": "0.13.19",
"0.4.6": "0.12.5",
Expand Down

0 comments on commit 50de622

Please sign in to comment.