1 Star 0 Fork 1

落尘/vue-tronlink

forked from KKDP/vue-tronlink 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
update 2.56 KB
一键复制 编辑 原始数据 按行查看 历史
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luochen/vue-tronlink.git
git@gitee.com:luochen/vue-tronlink.git
luochen
vue-tronlink
vue-tronlink
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385