forked from hallison/vim-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bakefile
62 lines (50 loc) · 1.31 KB
/
Bakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
declare pkg_name=markdown
declare pkg_base=$(dirname "$0")
declare pkg_version=$(git tag | sort | tail -n 1)
declare pkg_file="${pkg_name}-${pkg_version#v}.vba"
GLOB=(ftdetect/* snippets/* syntax/*)
source manifest.bk
source version.bk
desc package "Create ${pkg_file}.gz"
task package {
test -f ${pkg_file} && rm ${pkg_file}
test -f ${pkg_file}.* && rm ${pkg_file}.*
status "Creating package"
vim Manifest +":%MkVimball! ${pkg_file} ." +":q"
gzip ${pkg_file}
}
desc pkgtest "Create a VBA test package"
task pkgtest {
pkg_file="${pkg_name}-test.vba"
invoke package
}
desc install "Install vimball in ${HOME}/.vim/"
task install {
invoke package
status "Intalling ${pkg_file}"
vim ${pkg_file}.gz +":source %" +":q" &> /dev/null
}
desc doc "Build documentation"
task doc {
status "Building documentation"
run markdown -f toc -T -o README.html README.mkd
}
task push {
news="github codaset"
hosts="origin github codaset"
}
desc push:news "Push all changes to hosts"
task push:news {
status "Pushing new changes to ${news// /, }"
for remote in ${news}; do
run git push $remote news
done
}
desc push:release "Push a new release to hosts"
task push:release {
status "Pushing new release to ${hosts// /, }"
for remote in ${hosts}; do
git push --tags $remote master
done
}
# vim: filetype=sh