0,0 → 1,112 |
#!/bin/bash |
|
# OIDplus 2.0 |
# Copyright 2019 - 2023 Daniel Marschall, ViaThinkSoft |
# |
# Licensed under the Apache License, Version 2.0 (the "License"); |
# you may not use this file except in compliance with the License. |
# You may obtain a copy of the License at |
# |
# http://www.apache.org/licenses/LICENSE-2.0 |
# |
# Unless required by applicable law or agreed to in writing, software |
# distributed under the License is distributed on an "AS IS" BASIS, |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
# See the License for the specific language governing permissions and |
# limitations under the License. |
|
echo "===============================" |
echo "PREPARE FOR NEW OIDPLUS VERSION" |
echo "===============================" |
echo "" |
|
# TODO: Maybe we should also check for the word "SPONGE" and do not let commit if it is there (see TempleOS) |
|
# Please make sure to do all these steps before committing ANYTHING: |
|
DIR=$( dirname "$0" ) |
|
# 1. Recommended: Run dev/vendor_update.sh and make sure new/deleted files are added/deleted from the SVN/Git working copy |
echo "1. Run composer vendor update? (Recommended to do regularly)" |
select yn in "Yes" "No"; do |
case $yn in |
Yes ) "$DIR"/vendor_update.sh; break;; |
No ) break;; |
esac |
done |
|
# 2. Run dev/translation/message_regenerate.phps and translate things which are missing in plugins/viathinksoft/language/dede/messages.xml (search for "TODO") |
echo "2. Checking translation..." |
while true; do |
"$DIR"/translation/message_regenerate.phps |
cat "$DIR"/../plugins/viathinksoft/language/dede/messages.xml | grep TODO > /dev/null |
if [ $? -eq 0 ]; then |
echo "Problem: There are untranslated strings! Please translate them." |
sleep 2 |
nano "$DIR"/../plugins/viathinksoft/language/dede/messages.xml |
else |
break |
fi |
done |
|
# 3. Run phpstan |
echo "3. Running PHPSTAN..." |
cd "$DIR"/.. && phpstan |
echo "Is PHPSTAN output OK?" |
select yn in "Yes" "No"; do |
case $yn in |
Yes ) break;; |
No ) echo "Please fix the issues and run release script again"; exit 1;; |
esac |
done |
|
# 4. Make sure there are no unversioned files (otherwise systemfile check will generate wrong stuff) |
# PLEASE MAKE SURE that the SVN/Git-Working copy has no unversioned files, otherwise they would be included in the checksum catalog |
echo "4. Checking unversioned files" |
if [ -d "$DIR"/../.svn ]; then |
cd "$DIR"/.. && svn stat | grep "^?" |
if [ $? -eq 0 ]; then |
echo "STOP! There are unversioned files. Please add or remove them. (Otherwise systemfile check plugin will add these files)" |
exit 1 |
fi |
cd "$DIR"/.. && svn stat | grep "^!" |
if [ $? -eq 0 ]; then |
echo "STOP! There are missing files. Please fix this problem (remove them from the SVN)" |
exit 1 |
fi |
fi |
if [ -d "$DIR"/../.git ]; then |
cd "$DIR"/.. && git status |
echo "Is everything OK? (All files committed, no unversioned stuff? Otherwise system file check plugin will not work correctly)" |
select yn in "Yes" "No"; do |
case $yn in |
Yes ) break;; |
No ) echo "Please fix the issue first"; exit 1;; |
esac |
done |
fi |
|
# 5. Only if you want to start a new release: Add new entry to the top of changelog.json.php |
echo "5. Please edit changelog.json.php (add '-dev' for non-stable versions)" |
sleep 2 |
nano "$DIR"/../changelog.json.php |
|
# 6. Run plugins/viathinksoft/adminPages/902_systemfile_check/private/gen_serverside_v3 |
echo "6. Generate system file check checksum file..." |
"$DIR"/../plugins/viathinksoft/adminPages/902_systemfile_check/private/gen_serverside_v3 |
|
# 7. Commit to SVN or GIT |
if [ -d "$DIR"/../.svn ]; then |
echo "7. Committing to SVN" |
svn commit |
elif [ -d "$DIR"/../.git ]; then |
echo "7. ALL GOOD! PLEASE NOW COMMIT TO GIT" |
else |
echo "7. ALL GOOD! YOU CAN RELEASE IT" |
fi |
exit 0 |
|
# 8. (ViaThinkSoft internal / runs automatically) Sync SVN to GitHub |
|
# 9. (ViaThinkSoft internal / runs automatically) Run plugins/viathinksoft/adminPages/900_software_update/private/gen_serverside_v3 |
|
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
Added: svn:mime-type |
+text/x-sh |
\ No newline at end of property |