From c9bbc762f682ec483ca3882c911c4540dd7a78b5 Mon Sep 17 00:00:00 2001 From: Florimond Husquinet Date: Fri, 4 Sep 2020 06:01:10 +0200 Subject: [PATCH] SemVer 1.0.0 instead of 1.0.0.0 + replaceDomain script --- outlook/manifest.xml | 2 +- outlook/replaceDomain.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 outlook/replaceDomain.sh diff --git a/outlook/manifest.xml b/outlook/manifest.xml index bce1868..21abb0c 100644 --- a/outlook/manifest.xml +++ b/outlook/manifest.xml @@ -1,7 +1,7 @@ c5549a21-aefb-4ba8-ae7c-b77bceab4023 - 1.0.0.0 + 1.0.0 Odoo en-US diff --git a/outlook/replaceDomain.sh b/outlook/replaceDomain.sh new file mode 100644 index 0000000..d417c8b --- /dev/null +++ b/outlook/replaceDomain.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +helpFunction() +{ + echo "" + echo "Usage: $0 -d odoo.com/subdomain" + echo -e "\t-d The domain that will replace localhost:3000 in the manifest.xml and api.js files." + exit 1 # Exit script after printing help +} + +while getopts "d:" opt +do + case "$opt" in + d ) parameterD="$OPTARG" ;; + ? ) helpFunction ;; # Print helpFunction in case parameter is non-existent + esac +done + +# Print helpFunction in case parameters are empty +if [ -z "$parameterD" ] +then + echo "Some or all of the parameters are empty"; + helpFunction +fi + +escapedD=$(echo "$parameterD" | sed 's/\//\\\//g') +sed -i "s/localhost:3000/$escapedD/" dist/manifest.xml +sed -i "s/localhost:3000/$escapedD/" dist/taskpane.js \ No newline at end of file