Skip to content

Commit

Permalink
Merge pull request #335 from OneSignal/3.0.1
Browse files Browse the repository at this point in the history
3.0.1
  • Loading branch information
rgomezp authored Dec 20, 2024
2 parents 8e9423a + 3dde625 commit a387dd1
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
57 changes: 57 additions & 0 deletions build_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
WORDPRESS_GIT_SRC_PATH="."
DESTINATION_PATH="../onesignal-free-web-push-notifications/trunk/"
RELEASE_ARCHIVE_FILENAME="onesignal-free-web-push-notifications.zip"

# Prevent accidental rm -rf issues if running as root
if (( EUID == 0 )); then
echo "Please do not run this script as root for removing directory safety reasons."
exit 1
fi

# Using exclude .* excludes dot files and dot directories like .git, .vscode
if [[ $DESTINATION_PATH != *onesignal-free-web-push-notifications/trunk/ ]]; then
echo "Script was going to remove ${DESTINATION_PATH}, but quitting because destination path unexpectedly does not end in ...onesignal-free-web-push-notifications/trunk/. Exiting to prevent removing unexpected directory."
exit 1
fi

echo "Building Release Version of OneSignal WordPress Plugin"
echo "──────────────────────────────────────────────────────"

echo "Removing destination folder '${DESTINATION_PATH}'."
rm -rf $DESTINATION_PATH

echo "Creating new empty destination folder '${DESTINATION_PATH}'."
mkdir -p $DESTINATION_PATH

# The --delete option remove files from destination that are not present in source
exclude_options=(
"--exclude=.git/"
"--exclude=.env"
"--exclude=.gitignore"
"--exclude=.github"
"--exclude=.vscode/"
"--exclude=build_release.sh"
"--exclude=*.zip"
"--exclude=onesignal-free-web-push-notifications"
"--exclude=onesignal-free-web-push-notifications.zip"
"--exclude=CONTRIBUTING.md"
"--exclude=LICENSE"
"--exclude=docker*"
"--exclude=PluginDevDockerUsage.md"
"--exclude=README.md"
"--exclude=index.php"
"--exclude=views/css/*.scss"
"--exclude=views/css/callout.css"
"--exclude=views/css/link.css"
"--exclude=views/css/link.css"
"--exclude=views/css/semantic-ui"
)
rsync --archive --delete "${exclude_options[@]}" $WORDPRESS_GIT_SRC_PATH/ $DESTINATION_PATH

# Add new unversioned directories to SVN
svn status $DESTINATION_PATH | grep "^\?" | awk '{print $2}' | xargs -I {} svn add {}

echo "Creating archive of release contents as '${RELEASE_ARCHIVE_FILENAME}' in source directory '${WORDPRESS_GIT_SRC_PATH}'."
cd $WORDPRESS_GIT_SRC_PATH
zip -qr -x ".*" -x="build_release.sh" -x="*.zip" -x="onesignal-free-web-push-notifications" ${RELEASE_ARCHIVE_FILENAME} ./*
cd -
2 changes: 1 addition & 1 deletion onesignal.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Plugin Name: OneSignal Push Notifications
* Plugin URI: https://onesignal.com/
* Description: Free web push notifications.
* Version: 3.0.0
* Version: 3.0.1
* Author: OneSignal
* Author URI: https://onesignal.com
* License: MIT
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://onesignal.com
Tags: push notification, push notifications, desktop notifications, mobile notifications, chrome push, android, android notification, android notifications, android push, desktop notification, firefox, firefox push, mobile, mobile notification, notification, notifications, notify, onesignal, push, push messages, safari, safari push, web push, chrome
Requires at least: 3.8
Tested up to: 6.7
Stable tag: 3.0.0
Stable tag: 3.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -64,7 +64,7 @@ OneSignal is trusted by over 1.8M+ developers and marketing strategists. We powe

== Changelog ==

= 3.0.0 =
= 3.0.1 =
WARNING: this update contains changes that may break specific setups, as detailed below:

If you have made any code modifications to your Wordpress installation to directly interact with the OneSignal SDK, this version will break your implementation. Please revert your code modifications prior to upgrading and use our improved dashboard functionality to configure your OneSignal integration instead.
Expand Down

0 comments on commit a387dd1

Please sign in to comment.