basepath=$(cd `dirname $0`; pwd) cd $basepath date > lastpushtime.log git add lastpushtime.log git add ** tag=$(date +1.%Y%m%d.%k%M%S|sed 's/ //g'|sed 's/\.0/./g') sed -i "" 's/^version =.*/version = "'$tag'"/g' Cargo.toml echo $tag git commit -am "update" git push origin master git tag -a v$tag -m "update" git push origin v$tag && TARGET_CC=aarch64-linux-gnu-gcc cargo publish --allow-dirty --target aarch64-unknown-linux-gnu && find .. -type f -name Cargo.toml |grep -v "/common/"|grep -v "/target/"|xargs -I {} sed -i "" "s@^usc *=.*@usc = \"$tag\"@g" {} #git push origin v$tag && find .. -type f -name Cargo.toml |grep -v "/common/"|grep -v "/target/"|xargs -I {} sed -i "" "s@^usc *=.*@usc = { version = \"$tag\",path=\"../common\" }@g" {}