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 6473f920cd8279834e34a655f82d3f18dfedd933

Add deploy script
Author: xaizek
Author date (UTC): 2012-02-19 12:13
Committer name: xaizek
Committer date (UTC): 2012-02-19 12:13
Parent(s): 329dd823978be3bed5a97dcfbaa1c7acd5b02d2b
Signing key:
Tree: 3d378e7fe352c4721b7cd33972f3b25da0dac022
File Lines added Lines deleted
deploy 86 0
File deploy added (mode: 100755) (index 000000000..b43ce61c4)
1 #!/bin/bash
2
3 if [ "$#" -lt "1" -o "$#" -gt "2" ]; then
4 echo "Usage: $0 version [all|update|commit|archive]"
5 exit
6 fi
7
8 target="all"
9
10 if [ "$#" == "2" ]; then
11 target="$2"
12 fi
13
14 if [ "x$target" == "xall" -o "x$target" == "xupdate" ]; then
15 echo "Updating version number..."
16
17 # update version in ChangeLog
18 cp ChangeLog ChangeLog_tmp
19 sed "1s/current/$1/" ChangeLog_tmp > ChangeLog
20 rm ChangeLog_tmp
21
22 # update version in configure script
23 cp configure.in configure.in_tmp
24 sed "4s/, .*)/, $1)/" configure.in_tmp > configure.in
25 rm configure.in_tmp
26
27 if [ "x$OS" != "xWindows_NT" ]; then
28 # regenerate automake/autoconf files
29 autoreconf
30 fi
31
32 # update version in src/Makefile.win
33 makefile=src/Makefile.win
34 cp "$makefile" "${makefile}_tmp"
35 sed "s/VERSION \".*\"/VERSION \"$1\"/" "${makefile}_tmp" > "$makefile"
36 rm "${makefile}_tmp"
37 fi
38
39 if [ "x$target" == "xall" -o "x$target" == "xcommit" ]; then
40 echo "Making version commit..."
41
42 # commit or ammend new version
43 git tag "v$1"
44 if [ "$?" != "0" ]; then
45 git commit -av --amend -m "Version v$1"
46 else
47 git tag -d "v$1"
48 git commit -av -m "Version v$1"
49
50 # mark commit with tag
51 git tag "v$1"
52 fi
53 fi
54
55 if [ "x$target" == "xall" -o "x$target" == "xarchive" ]; then
56 echo "Building archive..."
57
58 # make archive
59 if [ "$OS" != "Windows_NT" ]; then
60 archive_name="vifm-v$1.tar.bz2"
61 git archive "v$1" --format tar | bzip2 > "$archive_name"
62 else
63 # remove config.h
64 if [ -f config.h ]; then
65 rm config.h
66 fi
67
68 # build vifm
69 export RELEASE=1
70 make -C src -f Makefile.win
71 if [ "$?" != "0" ]; then
72 echo "ERROR: Building project failed."
73 exit 1
74 fi
75
76 dir="vifm-w32-$1-binary"
77 mkdir "$dir"
78 cp -R data "$dir"
79 for i in ChangeLog COPYING FAQ INSTALL THANKS TODO; do
80 cp "$i" "$dir/$i.txt"
81 done
82 cp src/vifm-pause src/*.dll src/*.exe "$dir"
83 strip -S $dir/*.dll $dir/*.exe
84 zip -9 -r "$dir.zip" "$dir"
85 fi
86 fi
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