mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 03:35:07 +08:00
perf: tools
This commit is contained in:
54
bin/release.sh
Executable file
54
bin/release.sh
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if (( "$#" != 1 ))
|
||||
then
|
||||
echo "Tag has to be provided"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NOW=$(date +%s)
|
||||
CURRENT_BRANCH="master"
|
||||
VERSION=$1
|
||||
BASEPATH=$(cd `dirname $0`; cd ../src/; pwd)
|
||||
|
||||
# Always prepend with "v"
|
||||
if [[ $VERSION != v* ]]
|
||||
then
|
||||
VERSION="v$VERSION"
|
||||
fi
|
||||
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
|
||||
repos=$(ls $BASEPATH)
|
||||
|
||||
for REMOTE in $repos
|
||||
do
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Cloning $REMOTE";
|
||||
TMP_DIR="/tmp/hyperf-split"
|
||||
REMOTE_URL="git@github.com:hyperf-admin/$REMOTE.git"
|
||||
|
||||
rm -rf $TMP_DIR;
|
||||
mkdir $TMP_DIR;
|
||||
|
||||
(
|
||||
cd $TMP_DIR;
|
||||
|
||||
git clone $REMOTE_URL .
|
||||
git checkout "$CURRENT_BRANCH";
|
||||
|
||||
if [[ $(git log --pretty="%d" -n 1 | grep tag --count) -eq 0 ]]; then
|
||||
echo "Releasing $REMOTE"
|
||||
git tag $VERSION
|
||||
git push origin --tags
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
TIME=$(echo "$(date +%s) - $NOW" | bc)
|
||||
|
||||
printf "Execution time: %f seconds" $TIME
|
||||
@@ -9,7 +9,7 @@ REPOS=$@
|
||||
|
||||
function split()
|
||||
{
|
||||
SHA1=`splitsh-lite --prefix=$1`
|
||||
SHA1=`./bin/splitsh-lite --prefix=$1`
|
||||
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
|
||||
}
|
||||
|
||||
|
||||
BIN
bin/splitsh-lite
Executable file
BIN
bin/splitsh-lite
Executable file
Binary file not shown.
Reference in New Issue
Block a user