Skip to content

Commit

Permalink
ci(detach): update detach script
Browse files Browse the repository at this point in the history
  • Loading branch information
wsdjeg committed Jul 26, 2024
1 parent 057c0d5 commit 67b8ce7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 125 deletions.
138 changes: 14 additions & 124 deletions .ci/detach_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ EOT

main () {
case "$1" in
flygrep)
git clone https://github.com/wsdjeg/FlyGrep.vim.git detach/$1
FlyGrep.vim)
git clone https://github.com/wsdjeg/$1.git detach/$1
cd detach/$1
_checkdir syntax/
_checkdir autoload/SpaceVim/api
Expand Down Expand Up @@ -95,17 +95,8 @@ main () {
# detach test vimrc
_checkdir test
_detact_bundle FlyGrep test/vimrc
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_flygrep https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/FlyGrep.vim.git
git push wsdjeg_flygrep master
cd -
rm -rf detach/$1
exit 0
;;
dein-ui)
dein-ui.vim)
git clone https://github.com/wsdjeg/dein-ui.vim.git detach/$1
cd detach/$1
_checkdir syntax/
Expand All @@ -124,15 +115,6 @@ main () {
_detact autoload/SpaceVim/api/vim/compatible.vim
_detact syntax/SpaceVimPlugManager.vim
_detact LICENSE
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_dein_ui https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/dein-ui.vim.git
git push wsdjeg_dein_ui master
cd -
rm -rf detach/$1
exit 0
;;
cpicker.nvim)
git clone https://github.com/wsdjeg/cpicker.nvim.git detach/$1
Expand Down Expand Up @@ -169,15 +151,6 @@ main () {
_checkdir autoload/SpaceVim/api/neovim
_detact autoload/SpaceVim/api/neovim/floatting.vim
_detact LICENSE
git add .
git config user.email "[email protected]"
git config user.name "Eric Wong"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_cpicker https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/cpicker.nvim.git
git push wsdjeg_cpicker master
cd -
rm -rf detach/$1
exit 0
;;
SourceCounter.vim)
git clone https://github.com/wsdjeg/SourceCounter.vim.git detach/$1
Expand All @@ -202,17 +175,8 @@ main () {
_detact autoload/SpaceVim/api/vim/floatting.vim
_checkdir autoload/SpaceVim/api/neovim
_detact autoload/SpaceVim/api/neovim/floatting.vim
git add .
git config user.email "[email protected]"
git config user.name "Eric Wong"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_sourcecounter https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/SourceCounter.vim.git
git push wsdjeg_sourcecounter master
cd -
rm -rf detach/$1
exit 0
;;
iedit)
iedit.vim)
git clone https://github.com/wsdjeg/iedit.vim.git detach/$1
cd detach/$1
_checkdir autoload/SpaceVim/api/vim
Expand Down Expand Up @@ -246,15 +210,6 @@ command! -nargs=0 Iedit call SpaceVim#plugins#iedit#start()
EOT
_detact LICENSE
_default_readme "iedit.vim" "multiple cussor support for Vim/Neovim"
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/iedit.vim.git
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
vim-todo)
git clone https://github.com/wsdjeg/vim-todo.git detach/$1
Expand Down Expand Up @@ -290,15 +245,6 @@ EOT
command! OpenTodo call todo#open()
EOT
_detact LICENSE
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update"
git remote add wsdjeg_vim_todo https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-todo.git
git push wsdjeg_vim_todo master
cd -
rm -rf detach/$1
exit 0
;;
vim-chat)
git clone https://github.com/wsdjeg/vim-chat.git detach/$1
Expand All @@ -320,15 +266,6 @@ EOT
_detact_bundle vim-chat syntax/vimchat.vim
_detact_bundle vim-chat addon-info.json
_detact_bundle vim-chat README.md
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_vim_chat https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-chat.git
git push wsdjeg_vim_chat master
cd -
rm -rf detach/$1
exit 0
;;
JavaUnit.vim)
git clone https://github.com/wsdjeg/JavaUnit.vim.git detach/$1
Expand All @@ -339,15 +276,6 @@ EOT
# _detact autoload/SpaceVim/api/job.vim
# _checkdir autoload/chat/
_detact_bundle JavaUnit.vim README.md
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_javaunit_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/JavaUnit.vim.git
git push wsdjeg_javaunit_vim master
cd -
rm -rf detach/$1
exit 0
;;
git.vim)
git clone https://github.com/wsdjeg/git.vim.git detach/$1
Expand Down Expand Up @@ -397,15 +325,6 @@ EOT
_detact_bundle git.vim syntax/git-reflog.vim
_checkdir test
_detact_bundle git.vim test/vimrc
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_git_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/git.vim.git
git push wsdjeg_git_vim master
cd -
rm -rf detach/$1
exit 0
;;
vim-cheat)
git clone https://github.com/wsdjeg/vim-cheat.git detach/$1
Expand All @@ -420,15 +339,6 @@ EOT
_detact_bundle vim-cheat .vintrc.yaml
_checkdir doc/
_detact_bundle vim-cheat doc/vim-cheat.txt
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_vim_cheat https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/vim-cheat.git
git push wsdjeg_vim_cheat master
cd -
rm -rf detach/$1
exit 0
;;
xmake.vim)
git clone https://github.com/wsdjeg/xmake.vim.git detach/$1
Expand Down Expand Up @@ -471,15 +381,6 @@ EOT
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_symbols
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_targetdir
_detact_bundle xmake.vim rplugin/python3/deoplete/sources/docs/set_warnings
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_xmake_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/xmake.vim.git
git push wsdjeg_xmake_vim master
cd -
rm -rf detach/$1
exit 0
;;
scrollbar.vim)
git clone https://github.com/wsdjeg/scrollbar.vim.git detach/$1
Expand All @@ -494,17 +395,8 @@ EOT
_detact autoload/SpaceVim/plugins/scrollbar.vim
_detact LICENSE
_default_readme "scrollbar.vim" "floating scrollbar support for neovim/vim[wip]"
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_scrollbar https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/scrollbar.vim.git
git push wsdjeg_scrollbar master
cd -
rm -rf detach/$1
exit 0
;;
github.vim)
GitHub.vim)
git clone https://github.com/wsdjeg/GitHub.vim.git detach/$1
cd detach/$1
_checkdir plugin/
Expand All @@ -515,19 +407,17 @@ EOT
_default_readme "GitHub.vim" "GitHub API support for neovim/vim[wip]"
_checkdir doc/
_detact_bundle github doc/github.txt
git add .
git config user.email "[email protected]"
git config user.name "SpaceVimBot"
git commit -m "Auto Update based on https://github.com/SpaceVim/SpaceVim/commit/${GITHUB_SHA}"
git remote add wsdjeg_github_vim https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/GitHub.vim.git
git push wsdjeg_github_vim master
cd -
rm -rf detach/$1
exit 0
;;
spacevim-theme)
exit 0
esac
git add .
git config user.email "[email protected]"
git config user.name "Eric Wong"
git commit -m "${SpaceVim_COMMIT_MSG}"
git remote add wsdjeg_$1 https://SpaceVimBot:${BOTSECRET}@github.com/wsdjeg/$1.git
git push wsdjeg_$1 master
cd -
rm -rf detach/$1
exit 0
}

main $@
3 changes: 2 additions & 1 deletion .github/workflows/async.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ jobs:
strategy:
fail-fast: false
matrix:
detachPlugin: ["flygrep", "dein-ui", "vim-todo", "iedit", "scrollbar.vim", "vim-chat", "vim-cheat", "xmake.vim", "github.vim", "JavaUnit.vim", "git.vim", "cpicker.nvim", "SourceCounter.vim"]
detachPlugin: ["FlyGrep.vim", "dein-ui.vim", "vim-todo", "iedit.vim", "scrollbar.vim", "vim-chat", "vim-cheat", "xmake.vim", "GitHub.vim", "JavaUnit.vim", "git.vim", "cpicker.nvim", "SourceCounter.vim"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Detach ${{ matrix.detachPlugin }}
env:
BOTSECRET: ${{ secrets.BOTSECRET_GITHUB }}
SpaceVim_COMMIT_MSG: ${{ github.event.commits[0].message }}
run: .ci/detach_plugin.sh ${{ matrix.detachPlugin }}
4 changes: 4 additions & 0 deletions bundle/SourceCounter.vim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

### Options

- `-d`: specific directories

### Options

- `g:source_counter_sort` : sort method of result, by default, it is `files`, and if you want to sort by lines, use `let g:source_counter_sort = 'lines'`

### Screenshot
Expand Down

0 comments on commit 67b8ce7

Please sign in to comment.