Skip to content

Commit

Permalink
SemVer 1.0.0 instead of 1.0.0.0 + replaceDomain script
Browse files Browse the repository at this point in the history
  • Loading branch information
Florimond committed Sep 4, 2020
1 parent 7be1549 commit c9bbc76
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion outlook/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
<Id>c5549a21-aefb-4ba8-ae7c-b77bceab4023</Id>
<Version>1.0.0.0</Version>
<Version>1.0.0</Version>
<ProviderName>Odoo</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Odoo for Outlook"/>
Expand Down
28 changes: 28 additions & 0 deletions outlook/replaceDomain.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c9bbc76

Please sign in to comment.