-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpre_master_push.sh
More file actions
70 lines (63 loc) · 1.57 KB
/
pre_master_push.sh
File metadata and controls
70 lines (63 loc) · 1.57 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
66
67
68
69
70
# Modifies version and dates in some files before pushing to master
ver=$(cat VERSION)
update_help() {
gawk '{
if (NR==2)
print "Version '$ver'"
else if (NR==10) {
print " java -jar fasdpd.'$ver'.cli.jar fasdpd.FASDPD 'Commands'";
} else {
print $0
}
}' src/fasdpd/help > src/fasdpd/help.tmp
mv src/fasdpd/help.tmp src/fasdpd/help
}
update_readme() {
gawk '{
if (NR==1)
print "# FAS-DPD - Family Specific Degenerate Primer Design tool Version '$ver'"
else if (NR==3) {
print "Date: '$(date +%Y-%m-%d)'";
} else {
print $0
}
}' Readme.md > Readme.md.tmp
mv Readme.md.tmp Readme.md
}
update_manual() {
gawk '{
if (NR==2)
print "Version '$ver'"
else if (NR==10) {
print " java -jar fasdpd.'$ver'.cli.jar fasdpd.FASDPD 'Commands'";
} else {
print $0
}
}' MANUAL.md > MANUAL.md.tmp
mv MANUAL.md.tmp MANUAL.md
}
update_run_bat() {
gawk '{
if (NR==1)
print "java -jar fasdpd.'$ver'.cli.jar ^"
else {
print $0
}
}' example/Run.bat > example/Run.bat.tmp
mv example/Run.bat.tmp example/Run.bat
}
update_run_sh() {
gawk '{
if (NR==2)
print "java -jar fasdpd.'$ver'.cli.jar \\"
else {
print $0
}
}' example/Run.sh > example/Run.sh.tmp
mv example/Run.sh.tmp example/Run.sh
}
update_help
update_readme
update_manual
update_run_bat
update_run_sh