invoke make version
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 23 May 2011 10:33:56 +0000 (12:33 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 23 May 2011 10:33:56 +0000 (12:33 +0200)
macos/build-dmg.sh

index 13e7675..07cf801 100755 (executable)
@@ -12,6 +12,9 @@
 # the script expects the taglevels for both sfa and sface, 
 #   in order to retrieve the corresponding code and to label the resulting package properly
 #   alternatively, a build-dir and tags file can be used instead
 # the script expects the taglevels for both sfa and sface, 
 #   in order to retrieve the corresponding code and to label the resulting package properly
 #   alternatively, a build-dir and tags file can be used instead
+# Should have the folowing tools installed
+#   git: to retrieve code
+#   rpm: to retrieve the version numbers in specfiles
 
 # NOTES
 # we initially leveraged the first similar packaging initially made by Baris Metin
 
 # NOTES
 # we initially leveraged the first similar packaging initially made by Baris Metin
@@ -157,7 +160,15 @@ Also make sure to trash the current one before retrying"
     # retrieve sfa/sfa and sface/sface in the image
     rm -rf "$img_mnt"/$resource_path/{sfa,sface}
     git_retrieve $sfa_GITPATH sfa "$img_mnt"/$resource_path/
     # retrieve sfa/sfa and sface/sface in the image
     rm -rf "$img_mnt"/$resource_path/{sfa,sface}
     git_retrieve $sfa_GITPATH sfa "$img_mnt"/$resource_path/
+    # retrieve version number from specfile
+    sfa_tag=$(rpm -q --specfile "$img_mnt"/$resource_path/sfa/sfa.spec --qf '%{version}-%{taglevel}')
+    make -C "$img_mnt"/$resource_path/sfa VERSIONTAG="${sfa_tag}" SCMURL="${sfa_GITPATH}" version
+
     git_retrieve $sface_GITPATH sface "$img_mnt"/$resource_path/
     git_retrieve $sface_GITPATH sface "$img_mnt"/$resource_path/
+    # retrieve version number from specfile
+    sface_tag=$(rpm -q --specfile "$img_mnt"/$resource_path/sface/sface.spec --qf '%{version}-%{taglevel}')
+    make -C "$img_mnt"/$resource_path/sface VERSIONTAG="${sface_tag}" SCMURL="${sface_GITPATH}" version
+
     # copy binaries from sface to the bin dir
     for bin in sface.bin sface-run; do 
        # don't use the --file mode as this loses the executable bit
     # copy binaries from sface to the bin dir
     for bin in sface.bin sface-run; do 
        # don't use the --file mode as this loses the executable bit