2016-01-12 07:59:05 +01:00
|
|
|
#!/bin/bash
|
2023-01-24 15:29:31 +01:00
|
|
|
|
|
|
|
# Copyright (c) Cloud Software Group, Inc.
|
2016-01-12 07:59:05 +01:00
|
|
|
#
|
|
|
|
#Redistribution and use in source and binary forms, with or without modification,
|
|
|
|
#are permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
#1. Redistributions of source code must retain the above copyright notice, this
|
|
|
|
#list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
#2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
#this list of conditions and the following disclaimer in the documentation and/or
|
|
|
|
#other materials provided with the distribution.
|
|
|
|
#
|
|
|
|
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
#IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
|
|
|
#INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
#NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
|
|
#PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
#WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
#ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
#POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2016-03-09 14:30:42 +01:00
|
|
|
echo Entered re-branding.sh
|
2017-01-18 14:33:36 +01:00
|
|
|
set -u
|
2016-01-12 07:59:05 +01:00
|
|
|
|
2020-01-13 13:37:35 +01:00
|
|
|
GLOBAL_BUILD_NUMBER=$1
|
|
|
|
|
2017-01-18 14:33:36 +01:00
|
|
|
REPO="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
2016-01-12 07:59:05 +01:00
|
|
|
|
|
|
|
version_csharp()
|
|
|
|
{
|
2020-01-13 13:37:35 +01:00
|
|
|
sed -b -i -e "s/0\.0\.0\.0/${BRANDING_XC_PRODUCT_VERSION}.${GLOBAL_BUILD_NUMBER}/g" \
|
2020-01-22 15:47:39 +01:00
|
|
|
-e "s/0000/${BRANDING_XC_PRODUCT_VERSION}.${GLOBAL_BUILD_NUMBER}/g" \
|
2019-12-17 15:23:26 +01:00
|
|
|
$1
|
2016-01-12 07:59:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
rebranding_global()
|
|
|
|
{
|
2023-01-14 04:11:51 +01:00
|
|
|
sed -b -i -e "s#\[Vendor Legal\]#${BRANDING_COMPANY_NAME_LEGAL}#g" \
|
|
|
|
-e "s#\[Vendor\]#${BRANDING_COMPANY_NAME_SHORT}#g" \
|
|
|
|
-e "s#\[Guest Tools\]#${BRANDING_PV_TOOLS}#g" \
|
2023-01-13 14:25:21 +01:00
|
|
|
-e "s#\[XenServerProduct\]#${BRANDING_PRODUCT_BRAND}#g" \
|
2023-01-14 04:11:51 +01:00
|
|
|
-e "s#\[XenServer version\]#${BRANDING_PRODUCT_VERSION_TEXT}#g" \
|
|
|
|
-e "s#\[XenServer host\]#${BRANDING_SERVER}#g" \
|
2016-02-10 12:52:30 +01:00
|
|
|
-e "s#\[XenCenter\]#${BRANDING_BRAND_CONSOLE}#g" \
|
2021-03-16 02:50:45 +01:00
|
|
|
-e "s#\[XenCenter_No_Space\]#${BRANDING_BRAND_CONSOLE_NO_SPACE}#g" \
|
2021-06-02 03:09:06 +02:00
|
|
|
-e "s#xencenter\/current-release\/#${BRANDING_HELP_PATH}#g" \
|
2023-05-11 22:17:57 +02:00
|
|
|
-e "s#\[Xc updates url\]#${XC_UPDATES_URL}#g" \
|
2023-06-13 16:26:34 +02:00
|
|
|
-e "s#\[Cfu url\]#${CFU_URL}#g" \
|
2019-12-17 15:23:26 +01:00
|
|
|
$1
|
2016-01-26 07:48:38 +01:00
|
|
|
}
|
|
|
|
|
2023-01-13 21:50:39 +01:00
|
|
|
version_csharp "${REPO}/CommonAssemblyInfo.cs"
|
|
|
|
rebranding_global "${REPO}/CommonAssemblyInfo.cs"
|
|
|
|
|
2016-01-12 07:59:05 +01:00
|
|
|
#AssemblyInfo rebranding
|
2023-02-14 23:05:51 +01:00
|
|
|
for projectDir in CFUValidator CommandLib xe XenAdmin XenAdminTests XenCenterLib XenModel XenOvfApi xva_verify
|
2020-01-22 15:47:39 +01:00
|
|
|
do
|
2023-01-13 21:50:39 +01:00
|
|
|
assemblyInfo="${REPO}/${projectDir}/Properties/AssemblyInfo.cs"
|
|
|
|
version_csharp ${assemblyInfo}
|
|
|
|
rebranding_global ${assemblyInfo}
|
2020-01-22 15:47:39 +01:00
|
|
|
done
|
2016-01-12 07:59:05 +01:00
|
|
|
|
2021-01-12 13:23:29 +01:00
|
|
|
rebranding_global ${REPO}/XenAdmin/XenAdmin.csproj
|
2016-01-12 07:59:05 +01:00
|
|
|
|
2020-01-13 13:37:35 +01:00
|
|
|
PRODUCT_GUID=$(uuidgen | tr [a-z] [A-Z] | tr -d [:space:])
|
|
|
|
|
|
|
|
sed -b -i -e "s/@AUTOGEN_PRODUCT_GUID@/${PRODUCT_GUID}/g" \
|
2023-01-16 13:10:16 +01:00
|
|
|
-e "s/@PRODUCT_VERSION@/${BRANDING_XC_PRODUCT_VERSION_INSTALLER}/g" \
|
2019-12-17 15:23:26 +01:00
|
|
|
-e "s/@COMPANY_NAME_LEGAL@/${BRANDING_COMPANY_NAME_LEGAL}/g" \
|
|
|
|
-e "s/@COMPANY_NAME_SHORT@/${BRANDING_COMPANY_NAME_SHORT}/g" \
|
|
|
|
-e "s/@BRAND_CONSOLE@/${BRANDING_BRAND_CONSOLE}/g" \
|
2021-03-16 02:50:45 +01:00
|
|
|
-e "s/@BRAND_CONSOLE_NO_SPACE@/${BRANDING_BRAND_CONSOLE_NO_SPACE}/g" \
|
|
|
|
-e "s/@BRAND_CONSOLE_SHORT@/${BRANDING_BRAND_CONSOLE_SHORT}/g" \
|
2019-12-17 15:23:26 +01:00
|
|
|
-e "s/@PRODUCT_BRAND@/${BRANDING_PRODUCT_BRAND}/g" \
|
|
|
|
${REPO}/WixInstaller/branding.wxi
|
2016-01-14 11:52:53 +01:00
|
|
|
|
|
|
|
#XenAdminTests
|
2016-01-14 10:03:59 +01:00
|
|
|
rebranding_global ${REPO}/XenAdminTests/TestResources/ContextMenuBuilderTestResults.xml
|
2016-01-22 06:50:12 +01:00
|
|
|
rebranding_global ${REPO}/XenAdminTests/XenAdminTests.csproj
|
2019-12-17 15:23:26 +01:00
|
|
|
|
2017-01-18 14:33:36 +01:00
|
|
|
set +u
|