OSDN Git Service

DMG生成時のバージョン情報取得方法の変更。
authorseraphy <seraphy@users.osdn.me>
Thu, 15 Feb 2018 16:30:20 +0000 (01:30 +0900)
committerseraphy <seraphy@users.osdn.me>
Thu, 15 Feb 2018 16:30:20 +0000 (01:30 +0900)
version.propertiesの廃止のため。

dist/build_dmg.sh
dist/build_with_jre_dmg.sh
pom.xml

index 7423d7a..fd2a663 100755 (executable)
@@ -6,8 +6,10 @@ if [ ! -d "java6mac" -o ! -d "java8mac" ]; then
     exit 1
 fi
 
-# バージョン情報をプロパティファイルより抜き出す
-VERSION=$(cat ../src/main/resources/version.properties | sed -n -E 's/implements_version=([0123456789.]+).*$/\1/p')
+# バージョン情報
+if [ -z "$VERSION" ]; then
+    VERSION="0.0.0.0"
+fi
 echo "version=($VERSION)"
 
 # 生成するDMG名
index 9ae6495..c380ae7 100755 (executable)
@@ -6,8 +6,10 @@ if [ ! -d "java8macWithJRE" ]; then
     exit 1
 fi
 
-# プロパティファイルよりバージョン情報の読み込み
-VERSION=$(cat ../src/main/resources/version.properties | sed -n -E 's/implements_version=([0123456789.]+).*$/\1/p')
+# バージョン情報
+if [ -z "$VERSION" ]; then
+    VERSION="0.0.0.0"
+fi
 echo "version=($VERSION)"
 
 DMG_NAME="CharacterManaJ_${VERSION}_with_jre"
diff --git a/pom.xml b/pom.xml
index eee453c..5c6fae6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                                                <configuration>\r
                                                                        <executable>sh</executable>\r
                                                                        <workingDirectory>${basedir}/dist</workingDirectory>\r
-                                                                       <commandlineArgs>-c 'chmod +x *.sh;./build_all.sh'</commandlineArgs>\r
+                                                                       <commandlineArgs>-c 'export VERSION="${project.version}";chmod +x *.sh;./build_all.sh'</commandlineArgs>\r
                                                                </configuration>\r
                                                        </execution>\r
                                                </executions>\r