代码拉取完成,页面将自动刷新
同步操作将从 KKDP/vue-tronlink 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
# Accepts a version string and prints it incremented by one.
# Usage: increment_version <version> [<position>] [<leftmost>]
increment_version() {
declare -a part=( ${1//\./ } )
declare new
declare -i carry=1
for (( CNTR=${#part[@]}-1; CNTR>=0; CNTR-=1 )); do
len=${#part[CNTR]}
new=$((part[CNTR]+carry))
[ ${#new} -gt $len ] && carry=1 || carry=0
[ $CNTR -gt 0 ] && part[CNTR]=${new: -len} || part[CNTR]=${new}
done
new="${part[*]}"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo -e "${new// /.}"
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "${new// /.}"
elif [[ "$OSTYPE" == "cygwin" ]]; then
echo "not correct system - cygwin detected"
exit
fi
}
preinstall(){
npm install -g dts-gen
npm install typescript --save-dev
pip3 install git+git://github.com/psf/black
}
mod_package_json() {
param_chan=$(echo "$1 = \"$2\"")
echo "$param_chan"
cat $NODEPFILE | jq "$param_chan" $NODEPFILE | sponge $NODEPFILE
}
auto_install_nvm(){
if (( AUTO_INSTALL==1 )); then
$CMD_FINAL
else
echo "no install"
fi
}
npmdeploy(){
echo "npm deploy starts here.."
npm config set proxy=null
npm config set registry https://registry.npmjs.org/
username=$(npm whoami)
if [[ $username == "jrhess" ]]; then
echo "You have login the npm platform and it is ready to publish"
npm publish --dry-run
echo "dry run is done.."
npm publish --access=public
fi
npm config set registry=https://registry.npm.taobao.org/
auto_install_nvm
}
gitpush(){
local gitcheck=$(git diff --shortstat)
git add .
#git remote add origin https://gitee.com/jjhoc/vue-tronlink.git
git commit -m "Please check! $gitcheck"
git push origin master
git push github master -ff
echo "♻️ You can open ${GIT_LOC} or git clone ${GIT_LOC}.git to copy to the local"
}
taobao(){
echo "wait a moment then let taobao to sync the package"
sleep 10
cnpm sync vue-tronlink
cnpm info vue-tronlink
}
GIT_LOC=https://gitee.com/jjhoc/vue-tronlink.git
AUTO_INSTALL=0
#tsc -b
PROJECT_NAME="vue-tronlink"
VERSION=$(cat version)
increment_version $VERSION > version
VERSION=$(cat version)
CMD_FINAL="npm i -g $PROJECT_NAME@$VERSION"
NODEPFILE="package.json"
mod_package_json ".version" $VERSION
mod_package_json ".name" $PROJECT_NAME
mod_package_json ".author" "HeskemoKondax"
mod_package_json ".repository" "git@gitee.com:jjhoc/vue-tronlink.git"
mod_package_json ".homepage" "https://gitee.com/jjhoc/vue-tronlink"
echo "==== done ====="
gitpush
#npmdeploy
#taobao
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。