Add check for current tag
This commit is contained in:
parent
d1f54072d4
commit
f23f051c0d
1 changed files with 34 additions and 28 deletions
|
@ -91,6 +91,8 @@ if [ "${DEBUG}" == "true" ]; then
|
||||||
echo "Changing to Mastodon's home directory '${mastodon_home}'..."
|
echo "Changing to Mastodon's home directory '${mastodon_home}'..."
|
||||||
fi
|
fi
|
||||||
cd "${mastodon_home}" || exit 3
|
cd "${mastodon_home}" || exit 3
|
||||||
|
current_tag=$(git name-rev --name-only HEAD | awk 'BEGIN {FS="/"} {print($2)}')
|
||||||
|
if [ "${current_tag}" != "${tag}" ]; then
|
||||||
if [ "${DEBUG}" == "true" ]; then
|
if [ "${DEBUG}" == "true" ]; then
|
||||||
echo "Fetching from repository..."
|
echo "Fetching from repository..."
|
||||||
fi
|
fi
|
||||||
|
@ -122,3 +124,7 @@ if [ "${DEBUG}" == "true" ]; then
|
||||||
echo "Restarting Mastodon services..."
|
echo "Restarting Mastodon services..."
|
||||||
fi
|
fi
|
||||||
"${pre_command}"sudo systemctl restart mastodon-sidekiq.service mastodon-web.service mastodon-streaming mastodon-streaming@4000.service
|
"${pre_command}"sudo systemctl restart mastodon-sidekiq.service mastodon-web.service mastodon-streaming mastodon-streaming@4000.service
|
||||||
|
else
|
||||||
|
echo "Current branch is already '${tag}'"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue