-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
TOOTH_REMOTE_PATH=https://github.com/Tooth-Hub/LiteLoaderBDS-Legacy.git | ||
|
||
cd .. | ||
echo [INFO] Fetching LiteLoaderBDS-Legacy Tooth to GitHub ... | ||
|
||
# 获取标签 | ||
now_tag=$(git describe --tags --always | cut -d "-" -f 1) | ||
|
||
echo NOW_TAG $now_tag | ||
|
||
echo [INFO] LiteLoaderBDS-Legacy Tooth Pulling from remote... | ||
echo | ||
git clone ${TOOTH_REMOTE_PATH} Tooth | ||
|
||
# cd LiteLoaderBDS-Legacy | ||
# git fetch --all | ||
# git reset --hard origin/Protocol-408 | ||
# git checkout Protocol-408 | ||
# cd .. | ||
|
||
echo | ||
echo [INFO] Fetching LiteLoaderBDS-Legacy Tooth to GitHub finished | ||
echo | ||
|
||
|
||
# copy all from build/sdk to LiteLoaderSDK | ||
cp -r build/LiteLoaderBDS/* Tooth | ||
|
||
cd Tooth | ||
version=$1 | ||
vers=" \"version\": \"${version:1}\"," | ||
|
||
#modify tooth.json | ||
sed -i "4c\ ${vers}" ./tooth.json | ||
|
||
|
||
now_status=$(git status . -s) | ||
if [ "$now_status" ]; then | ||
echo [INFO] Modified files found. | ||
echo | ||
git add . | ||
git commit -m "${now_tag}" | ||
git tag ${now_tag} | ||
|
||
echo | ||
echo [INFO] Pushing to origin... | ||
echo | ||
|
||
git push https://%USERNAME%:%REPO_KEY%@github.com/Tooth-Hub/LiteLoaderBDS-Legacy.git Protocol-408 | ||
git push --tags https://%USERNAME%:%REPO_KEY%@github.com/Tooth-Hub/LiteLoaderBDS-Legacy.git Protocol-408 | ||
|
||
cd .. | ||
echo | ||
echo [INFO] Upload finished. | ||
echo | ||
else | ||
cd .. | ||
echo | ||
echo | ||
echo [INFO] No modified files found. | ||
echo [INFO] No need to Upgrade LiteLoaderBDS-Legacy. | ||
fi |