improve oms packaging script
@@ -23,7 +23,8 @@ fi
if [[ "$output_path" == "" ]]; then
output_path="../"
fi
-echo "Packaging extension $PACKAGE_NAME to $output_path"
+
+# Packaging starts here
cp -r ../Utils .
cp ../Common/WALinuxAgent-2.0.16/waagent .
@@ -35,6 +36,12 @@ cp $bundle_path packages/
# sync the file copy
sync
+if [[ -f $output_path/$PACKAGE_NAME ]]; then
+ echo "Removing existing $PACKAGE_NAME ..."
+ rm -f $output_path/$PACKAGE_NAME
+fi
+
+echo "Packaging extension $PACKAGE_NAME to $output_path"
excluded_files="omsagent.version packaging.sh apply_version.sh update_version.sh"
zip -r $output_path/$PACKAGE_NAME * -x $excluded_files "./Fairfax/*" "./Mooncake/*" "./test/*" "./extension-test/*" "./references"
