-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashgit.sh
More file actions
executable file
·70 lines (44 loc) · 1.15 KB
/
bashgit.sh
File metadata and controls
executable file
·70 lines (44 loc) · 1.15 KB
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
62
63
64
65
#!/usr/bin/env bash
now=$(date +"%m.%d.%Y %H:%M")
echo $0 $now
BUILDNR=0
MINOR=1
FILE=CurrentVersion
VERSIONSCRIPT=$FILE.sh
DUMMY=$FILE.dummy
README=README2.md
# use of ssh
REMOTE=git@github.com:go-hse/git-experiment.git
cat <<EOF > $README
# git-experiment
## Experimental usage of git commands
The Windows batch file playgit.bat
EOF
# clone from github with ssh
# git clone git@github.com:go-hse/git-experiment.git
# git config --global user.email "johndoe@example.com"
# git config --global user.name "john doe"
# check the configuration
# git config --list
echo - shows the remote repos >>$README
git remote -v
# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo - reads a batch file with the current build number, if it exists>>$README
if [ -f $VERSIONSCRIPT ]; then
source $VERSIONSCRIPT
fi
((BUILDNR++))
MINOR=$((BUILDNR/5))
# set /a MINOR=%BUILDNR% %% 5
cat <<EOF > $VERSIONSCRIPT
echo Build $BUILDNR $MINOR at $now
BUILDNR=$BUILDNR
EOF
cat <<EOF > $DUMMY
echo This is an unuseful dummy at $now
EOF
git status -s
git add $VERSIONSCRIPT
git add $0
git commit -m "Linux Build $BUILDNR"
# git push origin master