2021-01-21 14:15:05 +03:30
|
|
|
#!/bin/bash
|
|
|
|
|
2021-05-19 02:56:46 +04:30
|
|
|
rm -rf preview/*.jar preview/*.zip
|
|
|
|
|
2021-04-10 09:57:02 +04:30
|
|
|
cp master/server/build/Tachidesk-*.jar preview
|
2021-05-19 00:28:14 +04:30
|
|
|
cp master/server/build/Tachidesk-*.zip preview
|
|
|
|
|
2021-04-10 09:57:02 +04:30
|
|
|
cd preview
|
2021-02-05 00:11:20 +03:30
|
|
|
|
2021-05-19 00:28:14 +04:30
|
|
|
new_jar_build=$(ls Tachidesk-*.jar)
|
2021-02-04 23:47:16 +03:30
|
|
|
echo "last jar build file name: $new_jar_build"
|
2021-01-21 16:20:22 +03:30
|
|
|
|
2021-05-19 00:28:14 +04:30
|
|
|
latest=$(echo $new_jar_build | sed -e's/Tachidesk-\|.jar//g')
|
2021-04-18 19:58:07 +04:30
|
|
|
echo "{ \"latest\": \"$latest\" }" > index.json
|
2021-04-18 19:50:26 +04:30
|
|
|
|
2021-01-21 22:39:22 +03:30
|
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --global user.name "github-actions[bot]"
|
2021-01-21 14:15:05 +03:30
|
|
|
git status
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
|
|
git add .
|
2021-05-20 10:33:33 +04:30
|
|
|
git commit -m "Updated to $latest"
|
2021-01-21 14:15:05 +03:30
|
|
|
git push
|
|
|
|
else
|
|
|
|
echo "No changes to commit"
|
|
|
|
fi
|