代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/mysql-workbench 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
version=$1
major=`echo $version|cut -d. -f1`
minor=`echo $version|cut -d. -f2`
release=`echo $version|cut -d. -f3`
release_number=`echo $version|cut -d. -f3|sed -e 's/\([0-9]*\).*/\1/'`
build=`echo $version|cut -d. -f4`
release_type=$2
edition_name=$3
license_type=$4
echo "----------------------------------------------------"
echo "Setting workbench version"
echo "Version : $1"
echo "Release Type : $2"
echo "Edition : $3"
echo "License : $4"
echo "Parsed Version: $major.$minor.$release.$build"
echo "----------------------------------------------------"
if test "$build" = ""; then
build=0
fi
if test "$version" = ""; then
echo "$0 <major.minor.release[.build]> [<release-type>]"
exit 1
fi
if test x$release_type != x; then
dot_release_type=.$release_type
space_release_type=" $release_type"
else
dot_release_type=
space_release_type=
fi
echo "Updating wb_version.h"
sed -e "s/#define APP_MAJOR_NUMBER.*/#define APP_MAJOR_NUMBER $major/" \
-e "s/#define APP_MINOR_NUMBER.*/#define APP_MINOR_NUMBER $minor/" \
-e "s/#define APP_RELEASE_NUMBER.*/#define APP_RELEASE_NUMBER $release_number/" \
-e "s/#define APP_RELEASE_TYPE.*/#define APP_RELEASE_TYPE \"$release_type\"/" \
-e "s/#define APP_BUILD_NUMBER.*/#define APP_BUILD_NUMBER $build/" \
-i.bak backend/wbprivate/workbench/wb_version.h
if test "$edition_name" != "" -a "$license_type" != ""; then
sed -e "s/#define APP_LICENSE_TYPE.*/#define APP_LICENSE_TYPE \"$license_type\"/" \
-e "s/#define APP_EDITION_NAME.*/#define APP_EDITION_NAME \"$edition_name\"/" \
-i.bak backend/wbprivate/workbench/wb_version.h
fi
echo "Updating AssemblyInfo.cs"
sed -e "s/\[assembly: AssemblyVersion(.*)\]/[assembly: AssemblyVersion(\"$major.$minor.$release_number\")]/"\
-e "s/\[assembly: AssemblyFileVersion(.*)\]/[assembly: AssemblyFileVersion(\"$major.$minor.$release_number\")]/" \
-e "s/\[assembly: AssemblyReleaseType(.*)\]/[assembly: AssemblyReleaseType(\"$release_type\")]/" \
-i.bak frontend/windows/MySQLWorkbench/Properties/AssemblyInfo.cs
if test "$edition_type" != ""; then
sed -e "s/\[assembly: AssemblyConfiguration(.*)\]/[assembly: AssemblyConfiguration(\"$edition_type\")]/"\
-i.bak frontend/windows/MySQLWorkbench/Properties/AssemblyInfo.cs
fi
echo "Updating Info.plist"
sed -e "/<key>CFBundleShortVersionString<\/key>/N;s/.*\n.*<\/string>/ <key>CFBundleShortVersionString<\/key>@ <string>$major.$minor.$release$dot_release_type<\/string>/" -e 'y/@/\n/' -i.bak Info.plist
echo "Updating mysql-workbench.spec.in"
sed -e "s/--define='version.*'/--define='version $major.$minor.$release_number'/" -i.bak build/mysql-workbench.spec.in
# check if build/debian.in/changelog needs update
echo "Checking if build/debian.in/changelog needs updating"
if ! grep $major.$minor.$release- build/debian.in/changelog; then
echo "build/debian.in/changelog needs update, adding a new entry"
cat <<EOF > build/debian.in/changelog.new
mysql-workbench-@edition@ ($major.$minor.$release$dot_release_type-1@distrov@) @distro@; urgency=low
* New release
-- `git config user.name` <`git config user.email`> `LANG=en_EN date +"%a, %d %b %Y %T %z"`
EOF
cat build/debian.in/changelog >> build/debian.in/changelog.new
mv -f build/debian.in/changelog.new build/debian.in/changelog
head -10 build/debian.in/changelog
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。