newspack-scripts 5.9.5 → 5.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newspack-scripts",
3
- "version": "5.9.5",
3
+ "version": "5.9.6",
4
4
  "description": "",
5
5
  "bin": {
6
6
  "newspack-scripts": "./bin/newspack-scripts.js"
@@ -11,7 +11,11 @@ SVN_PLUGINS_URL="https://plugins.svn.wordpress.org"
11
11
  SVN_REPO_LOCAL_PATH="release/svn"
12
12
  SVN_REPO_URL="$SVN_PLUGINS_URL/$WP_ORG_PLUGIN_NAME"
13
13
 
14
- LATEST_GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
14
+ LATEST_GIT_TAG=$(git tag --list 'v*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
15
+ if [ -z "$LATEST_GIT_TAG" ]; then
16
+ echo "No stable version tag found. Aborting deployment."
17
+ exit 1
18
+ fi
15
19
  # Remove the "v" at the beginning of the git tag
16
20
  LATEST_SVN_TAG=${LATEST_GIT_TAG:1}
17
21