xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit b3ec762c7e9a384eb69428325be8ee944dca9802

Use $ver instead of $1 in the deploy script
Author: xaizek
Author date (UTC): 2015-06-17 17:58
Committer name: xaizek
Committer date (UTC): 2015-06-18 15:47
Parent(s): e4bacf8132ce1677f0c997e786f7d1d2139d9f97
Signing key:
Tree: ce6280a43fef9b0cbf406454a5f504976b890592
File Lines added Lines deleted
deploy 16 13
File deploy changed (mode: 100755) (index f3a6e1a25..ba43f8a99)
... ... if [ "$#" -lt "1" -o "$#" -gt "2" ]; then
5 5 exit 1 exit 1
6 6 fi fi
7 7
8 ver="$1"
9
8 10 target="all" target="all"
9 11
10 12 if [ $# -eq 2 ]; then if [ $# -eq 2 ]; then
 
... ... if [ "$target" = all -o "$target" = update ]; then
26 28 echo "Updating version number..." echo "Updating version number..."
27 29
28 30 # update version in ChangeLog # update version in ChangeLog
29 sed -i "1s/current/$1/" ChangeLog
31 sed -i "1s/current/$ver/" ChangeLog
30 32
31 33 # update version in configure script # update version in configure script
32 sed -i "/AM_INIT_AUTOMAKE/s/, .*)/, $1)/" configure.ac
34 sed -i "/AM_INIT_AUTOMAKE/s/, .*)/, $ver)/" configure.ac
33 35
34 36 if [ "$OS" != Windows_NT ]; then if [ "$OS" != Windows_NT ]; then
35 37 # regenerate autotools files # regenerate autotools files
 
... ... if [ "$target" = all -o "$target" = update ]; then
45 47
46 48 # update version in src/Makefile.win # update version in src/Makefile.win
47 49 makefile=src/Makefile.win makefile=src/Makefile.win
48 sed -i "/define VERSION/s/VERSION \".*\"/VERSION \"$1\"/" "${makefile}"
50 sed -i "/define VERSION/s/VERSION \".*\"/VERSION \"$ver\"/" "${makefile}"
49 51
50 52 vimplugindoc=data/vim/doc/plugin/vifm-plugin.txt vimplugindoc=data/vim/doc/plugin/vifm-plugin.txt
51 53 vimappdoc=data/vim/doc/app/vifm-app.txt vimappdoc=data/vim/doc/app/vifm-app.txt
52 54 # update version in vifm-{app,plugin}.txt # update version in vifm-{app,plugin}.txt
53 sed -i "/For Vifm version/s/version \\S\\+/version $1/" "${vimplugindoc}"
54 sed -i "/For Vifm version/s/version \\S\\+/version $1/" "${vimappdoc}"
55 sed -i "/For Vifm version/s/version \\S\\+/version $ver/" "${vimplugindoc}"
56 sed -i "/For Vifm version/s/version \\S\\+/version $ver/" "${vimappdoc}"
55 57 # update last change date in vifm-{app,plugin}.txt # update last change date in vifm-{app,plugin}.txt
56 58 sed -i "/Last change/s/: .*/: $(date '+%Y %b %d')/" "${vimplugindoc}" sed -i "/Last change/s/: .*/: $(date '+%Y %b %d')/" "${vimplugindoc}"
57 59 sed -i "/Last change/s/: .*/: $(date '+%Y %b %d')/" "${vimappdoc}" sed -i "/Last change/s/: .*/: $(date '+%Y %b %d')/" "${vimappdoc}"
 
... ... if [ "$target" = all -o "$target" = update ]; then
60 62 sed -i "/^Updated:/s/ .*/$(date '+ %d %B, %Y')/" README sed -i "/^Updated:/s/ .*/$(date '+ %d %B, %Y')/" README
61 63
62 64 # update version in README # update version in README
63 sed -i "/^Version:/s/ .*/ $1/" README
65 sed -i "/^Version:/s/ .*/ $ver/" README
64 66
65 67 # update man pages # update man pages
66 sed -i "1s/\"[^\"]\\+\" \"[^\"]\\+\"\$/\"$(date '+%B %d, %Y')\" \"vifm $1\"/" data/*.1
68 sed -i "1s/\"[^\"]\\+\" \"[^\"]\\+\"\$/\"$(date '+%B %d, %Y')\" \"vifm $ver\"/" data/*.1
67 69 fi fi
68 70
69 71 if [ "$target" = all -o "$target" = commit ]; then if [ "$target" = all -o "$target" = commit ]; then
 
... ... if [ "$target" = all -o "$target" = commit ]; then
71 73
72 74 # try to mark commit with tag to figure out what to do: # try to mark commit with tag to figure out what to do:
73 75 # commit or ammend changes # commit or ammend changes
74 git tag "v$1"
76 git tag "v$ver"
75 77 if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
76 78 amendflag=--amend amendflag=--amend
77 79 else else
78 80 amendflag= amendflag=
79 81 fi fi
80 git commit -av $amendflag -m "Version v$1"
82 git commit -av $amendflag -m "Version v$ver"
81 83 if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
82 84 echo 'Committing error.' echo 'Committing error.'
83 85 exit 1 exit 1
84 86 fi fi
85 87 # force mark commit with tag # force mark commit with tag
86 git tag --force "v$1"
88 git tag --force "v$ver"
87 89 fi fi
88 90
89 91 if [ "$target" = all -o "$target" = archive ]; then if [ "$target" = all -o "$target" = archive ]; then
 
... ... if [ "$target" = all -o "$target" = archive ]; then
91 93
92 94 # make archive # make archive
93 95 if [ "$OS" != Windows_NT ]; then if [ "$OS" != Windows_NT ]; then
94 archive_name="vifm-$1.tar.bz2"
95 git archive "v$1" --prefix "vifm-$1/" --format tar | bzip2 > "$archive_name"
96 archive_name="vifm-$ver.tar.bz2"
97 git archive "v$ver" --prefix "vifm-$ver/" --format tar |
98 bzip2 > "$archive_name"
96 99 else else
97 100 # remove config.h # remove config.h
98 101 if [ -f config.h ]; then if [ -f config.h ]; then
 
... ... if [ "$target" = all -o "$target" = archive ]; then
106 109 exit 3 exit 3
107 110 fi fi
108 111
109 dir="vifm-w32-$1-binary"
112 dir="vifm-w32-$ver-binary"
110 113 rm -rf "$dir" rm -rf "$dir"
111 114 mkdir "$dir" mkdir "$dir"
112 115 cp -R data "$dir" cp -R data "$dir"
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master