Skip to content

Commit

Permalink
mu-wpcom: For Newspack blocks sync, save only version (#39471)
Browse files Browse the repository at this point in the history
The package.json in there is unused except for the version number field.
Save the version number to a version.txt file instead to avoid confusing
Renovate (cf. #39330).
  • Loading branch information
anomiex authored Sep 23, 2024
1 parent 2a290e3 commit 71992bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ ENTRY=./src/features/newspack-blocks/index.php
if [[ ( "$MODE" != "path" ) && ( "$MODE" != "npm" ) ]];
then
# return early if the version is the same
if [ -f $TARGET/package.json ]; then
CURRENT_VERSION=v`jq -r .version $TARGET/package.json`
if [ -f $TARGET/version.txt ]; then
CURRENT_VERSION=$(< $TARGET/version.txt )

if [[ "$CURRENT_VERSION" == "$NAME" ]]; then
echo "The current version $CURRENT_VERSION of the newspack-blocks is synced."
Expand Down Expand Up @@ -128,7 +128,8 @@ mkdir -p $TARGET/shared
mkdir -p $TARGET/types

# copy files and directories
cp $CODE/package.json $TARGET/
NEW_VERSION=v`jq -r .version $CODE/package.json`
echo "$NEW_VERSION" > $TARGET/version.txt
cp $CODE/includes/class-newspack-blocks-api.php $TARGET/
cp $CODE/includes/class-newspack-blocks.php $TARGET/
cp -R $CODE/src/blocks/homepage-articles $TARGET/blocks/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Synced Newspack blocks: Save just the version instead of the whole package.json to avoid confusing Renovate.


This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v4.0.1

0 comments on commit 71992bd

Please sign in to comment.