#!/bin/bash
VersionPath="Mine/SettingController.m"
if ["$BUILD_NUMBER" = ""]||["$SVN_REVISION" = ""]
then
echo "version is null"
else
sed -i '' -e "s%[0-9].[0-9]{1,10}.[0-9]{1,10}%0.$BUILD_NUMBER.$SVN_REVISION%" $VersionPath
fi
ServerHeader="csfz_SERVER_URL "
ServerPath="Common/Constant.h"
Quotes='@"'
Mquotes='"'
if ["$SERVER_URL_PREFIX" = ""]
then
echo "server_url_prefix is null"
else
sed -i '' -e "s%csfz_SERVER_URL[[:blank:]]@.*%$ServerHeader$Quotes$SERVER_URL_PREFIX$Mquotes%" $ServerPath
fi
BUILD_NUMBER="1"
SVN_REVISION="100"
VersionPath="AQBX/info.plist"
if ["$BUILD_NUMBER" = ""]||["$SVN_REVISION" = ""]
then
echo "version is null"
else
sed -i '' -e "s%<string>[0-9].[0-9]{1,10}.[0-9]{1,10}</string>%<string>0.$BUILD_NUMBER.$SVN_REVISION</string>%" $VersionPath
echo "version is not null"
fi