summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kutsan <AKutsan@luxoft.com>2014-09-11 17:33:54 +0300
committerAlexander Kutsan <AKutsan@luxoft.com>2014-09-11 18:13:26 +0300
commitf0618b388607dd8cacd1b27b9e461fbcc50c618a (patch)
tree352865e21e3e53fbac7eb1efba68f63c5efb3c2d
parente5ce2983a6852684d464ab63e380a14d7e1e1630 (diff)
downloadsmartdevicelink-f0618b388607dd8cacd1b27b9e461fbcc50c618a.tar.gz
APPLINK-8466 Modifided script to add git commit-hash in snapshots, and check validation of snapshotSNAPSHOT_PASA12092014
-rw-r--r--CMakeLists.txt2
-rw-r--r--customer-specific/genivi.conf4
-rw-r--r--customer-specific/pasa.conf25
-rw-r--r--customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp1
-rwxr-xr-xtools/Utils/export-customer-specific.sh2
-rwxr-xr-xtools/Utils/git_email_notifier/last_commit.sh2
6 files changed, 25 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4ce09c78..30193b149 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@ set(ARCH_TYPE_OPTION "$ENV{ARCH_TYPE}")
add_custom_target(pasa-tarball
COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} pasa
- COMMAND tar -czv -C /tmp/PASA -f ${CMAKE_BINARY_DIR}/pasa.tar.gz .
+ COMMAND tar -czv -C /tmp/PASA -f ${CMAKE_BINARY_DIR}/pasa.tar.gz . > /dev/null
DEPENDS HMI_API MOBILE_API v4_protocol_v1_2_no_extra
)
diff --git a/customer-specific/genivi.conf b/customer-specific/genivi.conf
index 0941b807f..b943213fc 100644
--- a/customer-specific/genivi.conf
+++ b/customer-specific/genivi.conf
@@ -2,7 +2,6 @@ include_src="src \
cmake \
Doxyfile \
tools/InterfaceGenerator \
- tools \
test \
FindQt.sh \
CMakeLists.txt \
@@ -11,8 +10,7 @@ include_src="src \
include_bin=""
-exclude_src="src/components/policy/src/policy/policy_table/table_struct_ext
- "
+exclude_src="src/components/policy/src/policy/policy_table/table_struct_ext"
exclude_bin=""
diff --git a/customer-specific/pasa.conf b/customer-specific/pasa.conf
index 85262bf3e..90fb7802d 100644
--- a/customer-specific/pasa.conf
+++ b/customer-specific/pasa.conf
@@ -44,16 +44,31 @@ export_dir=/tmp/PASA
files_to_filter="*.c|*.cc|*.cpp|*.h|*.hpp"
filter_command="tools/Utils/define_parser.py -d CUSTOMER_PASA -u CUSTOMER_FORD -u ENABLE_SECURITY -i "
-#filter_command="tools/Utils/prepreproc.pl -DCUSTOMER_PASA -UCUSTOMER_FORD -UENABLE_SECURITY"
function snapshot_tag() {
date +"SNAPSHOT_PASA%d%m%Y"
}
+function last_commit {
+ git --git-dir=$srcdir'/.git' log origin/develop| head -n 1|cut -f 2 -d ' '
+}
+
+function chech_valid() {
+ res=$(find /tmp/PASA -type f -exec grep -H CUSTOMER_PASA {} \;)
+ if [[ res=="" ]] ; then
+ echo "Sources are valid";
+ else
+ echo "There are some problems during parsing some headers: ";
+ echo $res
+ fi
+}
+
function post_install {
- cp -r $specificdir/* $export_dir
- sed 's/{TAG}/'$(snapshot_tag)'/g' -i $export_dir/src/appMain/SmartDeviceLinkMainApp.cpp
- find $export_dir \
+ sed 's/{TAG}/'$(snapshot_tag)'/g' -i $export_dir/src/appMain/SmartDeviceLinkMainApp.cpp
+ sed 's/{GIT_COMMIT}/'$(last_commit)'/g' -i $export_dir/src/appMain/SmartDeviceLinkMainApp.cpp
+ find $export_dir \
-regex '.*\.\(cc\|h\|cpp\|hpp\)' \
-exec unix2dos {} \;
-} \ No newline at end of file
+ echo "Snapshoted on :"$(last_commit)
+ chech_valid
+}
diff --git a/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp b/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
index 8f23da61a..eb7646d4d 100644
--- a/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
+++ b/customer-specific/pasa/src/appMain/SmartDeviceLinkMainApp.cpp
@@ -269,6 +269,7 @@ int main(int argc, char** argv) {
threads::Thread::SetMainThread();
LOG4CXX_INFO(logger, "Snapshot: {TAG}");
+ LOG4CXX_INFO(logger, "Git commit: {GIT_COMMIT}");
LOG4CXX_INFO(logger, "Application main()");
utils::SharedPtr<threads::Thread> applink_notification_thread =
diff --git a/tools/Utils/export-customer-specific.sh b/tools/Utils/export-customer-specific.sh
index 7b4dac1ea..2115a410c 100755
--- a/tools/Utils/export-customer-specific.sh
+++ b/tools/Utils/export-customer-specific.sh
@@ -178,5 +178,7 @@ for entry in $include_bin; do
done
done
+set +f
+cp -r $specificdir/* $export_dir/
post_install
diff --git a/tools/Utils/git_email_notifier/last_commit.sh b/tools/Utils/git_email_notifier/last_commit.sh
index 73e3a297a..68438d67f 100755
--- a/tools/Utils/git_email_notifier/last_commit.sh
+++ b/tools/Utils/git_email_notifier/last_commit.sh
@@ -1,5 +1,3 @@
#!//bin/bash
last_develop=`git --git-dir=$1 log origin/develop| head -n 1|cut -f 2 -d ' '`;
git --git-dir=$1 show --pretty="format: %an| %ae | %H | %s" --name-only $last_develop
-#a=$()
-#echo $a \ No newline at end of file