Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6fda95b

Browse files
committed
Adding on-build update of QuercusVersion.java
1 parente0e4119 commit6fda95b

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

‎bin/cleanJava.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
git checkout --$1

‎bin/prepareJava.sh‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
TAGV=`git describe --tags --abbrev=0`
4+
TAGT=`git describe --tags`
5+
BR=`git describe --all| sed s/"\(.*\)\/\([^/]*\)$"/"\2"/`
6+
DATE=`git log --pretty=format:"%ad" --date=short -1| sed s/"-"/""/g`
7+
8+
if [["$TAGV"=="$TAGT" ]];then
9+
VER=$TAGV
10+
else
11+
VER=$BR
12+
fi
13+
14+
sed -i -e s/"@@Version@@"/$VER/ -e s/"@@VersionDate@@"/$DATE/$1
15+

‎build.gradle‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,17 @@ project(':quercus') {
2121
compile project(':resin')
2222
compile fileTree(dir:'lib',include:'*.jar')
2323
}
24+
25+
task prepareJava<< {
26+
String buildV= ["./bin/prepareJava.sh","$projectDir/src/main/java/com/caucho/quercus/QuercusVersion.java"].execute().text
27+
}
28+
29+
task cleanJava<< {
30+
String cleanV= ["./bin/cleanJava.sh","$projectDir/src/main/java/com/caucho/quercus/QuercusVersion.java"].execute().text
31+
}
32+
33+
compileJava.dependsOn prepareJava
34+
jar.dependsOn cleanJava
35+
2436
metaInf<< file('src/main/java/META-INF/')
2537
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp