2021-01-21 14:15:05 +03:30
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-10 09:57:02 +04:30
|
|
|
cp master/server/build/Tachidesk-*.jar preview
|
|
|
|
cd preview
|
2021-02-05 00:11:20 +03:30
|
|
|
|
2021-02-04 23:47:16 +03:30
|
|
|
new_jar_build=$(ls *.jar| tail -1)
|
|
|
|
echo "last jar build file name: $new_jar_build"
|
2021-01-21 16:20:22 +03:30
|
|
|
|
2021-02-04 23:47:16 +03:30
|
|
|
cp -f $new_jar_build Tachidesk-latest.jar
|
2021-01-22 01:55:41 +03:30
|
|
|
|
2021-04-18 20:45:15 +04:30
|
|
|
rm -rf latest_pointer/*
|
|
|
|
cp $new_jar_build latest_pointer
|
|
|
|
|
2021-05-07 14:41:19 +04:30
|
|
|
latest=$(ls *.jar | tail -n1 | 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-04-10 09:57:02 +04:30
|
|
|
git commit -m "Update preview repository"
|
2021-01-21 14:15:05 +03:30
|
|
|
git push
|
|
|
|
else
|
|
|
|
echo "No changes to commit"
|
|
|
|
fi
|