Skip to content

Commit

Permalink
Merge pull request #27 from the-markup/release-0.1.0
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
dphiffer authored Oct 26, 2022
2 parents d50ee24 + 9aabb19 commit 1564724
Show file tree
Hide file tree
Showing 7 changed files with 2,093 additions and 1,793 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**Requires at least:** 4.5
**Tested up to:** 6.0.0
**Requires PHP:** 7.3
**Stable tag:** 0.0.1
**Stable tag:** 0.1.0
**License:** GPLv2 or later
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -27,7 +27,7 @@ A WordPress dashboard interface for managing a self-hosted [Shlink URL shortener
__Filter hooks__

* `smol_links_tags` - assigns tags to each saved short link (default: `["smol-links-server:$hostname", "smol-links-user:$username"]`)
* `smol_links_long_url` - automatically adjusts the long URL redirect
* `smol_links_long_url` - automatically adjust the long URL redirect
* `smol_links_manager_tabs` - customizes the manager tabs (array: ["Tab label" => [*Shlink API query*]])

# Developer setup #
Expand Down Expand Up @@ -58,6 +58,10 @@ docker-compose exec web composer --working-dir="/var/www/html/wp-content/plugins

## Changelog ##

### 0.1.0 ###
* Release to WordPress plugin directory
* Security improvements

### 0.0.1 ###
* Generate short URLs upon saving a post
* Create/edit short URLs from a manager
Expand Down
35 changes: 22 additions & 13 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,40 @@

set -e

if [ -d /tmp/smol-links ] ; then
echo "Error: /tmp/smol-links already exists"
exit 1
if [ $# -lt 1 ]; then
echo "usage: $0 <svn dir>"
exit 1
fi

dir="$( cd "$(dirname "$( dirname "${BASH_SOURCE[0]}" )" )" >/dev/null 2>&1 && pwd )"
version="$(cat "$dir/readme.txt" | grep "Stable tag: " | cut -c 13-)"
svn="$1"

if [ -d "$svn/tags/$version" ] ; then
echo "Error: $svn/tags/$version already exists"
exit 1
fi

echo "Running grunt..."
npm run grunt

echo "Building assets..."
cd "$dir"
npm run build

echo "Creating /tmp/smol-links..."
mkdir /tmp/smol-links
echo "Creating $svn/tags/$version..."
mkdir "$svn/tags/$version"
rsync --recursive \
--verbose \
--include="vendor/autoload.php" \
--exclude-from=".distignore" \
"$dir/" \
/tmp/smol-links/

echo "Zipping release..."
cd /tmp
zip -r smol-links.zip smol-links
"$svn/tags/$version/"

echo "Cleaning up /tmp/smol-links..."
rm -rf /tmp/smol-links
echo "Copying to $svn/trunk..."
rsync --recursive \
--verbose \
"$svn/tags/$version/" \
"$svn/trunk/"

echo "Ready: /tmp/smol-links.zip"
echo "Done"
8 changes: 6 additions & 2 deletions languages/smol-links.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Smol Links 0.0.1\n"
"Project-Id-Version: Smol Links 0.1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/smol-links\n"
"POT-Creation-Date: 2022-10-14 19:35:10+00:00\n"
"POT-Creation-Date: 2022-10-26 17:17:53+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -29,6 +29,10 @@ msgid "Smol Links"
msgstr ""

#: src/Manager.php:188
msgid "Cannot connect to Shlink Server."
msgstr ""

#: src/Manager.php:189
msgid "Please configure Shlink API settings."
msgstr ""

Expand Down
Loading

0 comments on commit 1564724

Please sign in to comment.