Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lua/neo-tree/sources/common/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ local open_with_cmd = function(state, open_cmd, toggle_directory, open_file)
local function open()
M.revert_preview()
local path = node.path or node:get_id()
if node.type == "terminal" then
path = node:get_id()
end
if type(open_file) == "function" then
open_file(state, path, open_cmd)
else
Expand Down
35 changes: 27 additions & 8 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
#/bin/bash
VERSION=$1
MAJOR_VERSION="v2.x"
REPO="nvim-neo-tree/neo-tree.nvim"
LAST_VERSION=$(curl --silent "https://api.github.com/repos/$REPO/releases/latest" | jq -r .tag_name)
echo "LAST_VERSION=$LAST_VERSION"
MAJOR=$(cut -d. -f1 <<<"$LAST_VERSION")
MINOR=$(cut -d. -f2 <<<"$LAST_VERSION")
echo

RELEASE_BRANCH="${1:-v${MAJOR}.x}"
echo "RELEASE_BRANCH=$RELEASE_BRANCH"
NEXT_VERSION=$MAJOR.$((MINOR+1))
NEW_VERSION="${2:-${NEXT_VERSION}}"
echo "NEW_VERSION=$NEW_VERSION"
echo

read -p "Are you sure you want to publish this release? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
fi

git fetch
git checkout main
git pull
echo "Merging to ${MAJOR_VERSION}"
git checkout $MAJOR_VERSION
echo "Merging to ${RELEASE_BRANCH}"
git checkout $RELEASE_BRANCH
git pull
if git merge --ff-only origin/main; then
git push
git tag -a $VERSION -m "Release ${VERSION}"
git push origin $VERSION
git tag -a $NEW_VERSION -m "Release ${NEW_VERSION}"
git push origin $NEW_VERSION
echo "Creating Release"
gh release create $VERSION --title "Release $VERSION" --notes ""
gh release create $NEW_VERSION --generate-notes
else
echo "RELEASE FAILED! Could not fast-forward release to $MAJOR_VERSION"
echo "RELEASE FAILED! Could not fast-forward release to $RELEASE_BRANCH"
fi
git checkout main