From 298ff998b073bbef46aba8a72eb588fe4a95a20e Mon Sep 17 00:00:00 2001 From: tec-bot Date: Tue, 10 Sep 2024 12:18:09 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'bin/proces?= =?UTF-8?q?s-changelog.sh'=20with=20remote=20'templates/bin/process-change?= =?UTF-8?q?log.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/process-changelog.sh | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/bin/process-changelog.sh b/bin/process-changelog.sh index e2e93f1ef8..694774b3a2 100755 --- a/bin/process-changelog.sh +++ b/bin/process-changelog.sh @@ -5,7 +5,34 @@ CURRENT_VERSION=${2-} ACTION_TYPE=${3-generate} RELEASE_DATE=${4-today} -RELEASE_DATE=$( date "+%Y-%m-%d" -d "$RELEASE_DATE" ) # Release date formatted as YYYY-MM-DD +if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS with gdate + RELEASE_DATE=$( gdate "+%Y-%m-%d" -d "$RELEASE_DATE" ) +else + # Linux + RELEASE_DATE=$( date "+%Y-%m-%d" -d "$RELEASE_DATE" ) +fi + +sed_compatible() { + if [[ "$1" == "-r" ]]; then + # Remove the -r argument + shift + if [[ "$OSTYPE" == "darwin"* ]]; then + # macOS with -E flag + sed -i '' -E "$@" + else + # Linux with -r flag + sed -i -r "$@" + fi + else + # No -r argument, regular sed command + if [[ "$OSTYPE" == "darwin"* ]]; then + sed -i '' "$@" + else + sed -i "$@" + fi + fi +} SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" @@ -14,7 +41,7 @@ cd $SCRIPT_DIR/../ echo "RELEASE_DATE=$RELEASE_DATE" if [ "$ACTION_TYPE" == "amend-version" ]; then - perl -i -pe "s/^### \[\Q$CURRENT_VERSION\E\] .*$/### [$RELEASE_VERSION] $RELEASE_DATE/" changelog.md + sed_compatible "s/^### \[$CURRENT_VERSION\] .*$/### [$RELEASE_VERSION] $RELEASE_DATE/" changelog.md else if [ "$ACTION_TYPE" == "generate" ]; then CHANGELOG_FLAG="" @@ -38,11 +65,11 @@ CHANGELOG=${CHANGELOG//&/\\&} echo "CHANGELOG=$CHANGELOG" if [ "$ACTION_TYPE" == "amend-version" ]; then - perl -i -pe "s/^= \[\Q$CURRENT_VERSION\E\] .* =$/= [$RELEASE_VERSION] $RELEASE_DATE =/" readme.txt + sed_compatible "s/^= \[$CURRENT_VERSION\] .* =$/= [$RELEASE_VERSION] $RELEASE_DATE =/" readme.txt else if [ "$ACTION_TYPE" == "amend" ]; then perl -i -p0e "s/= \[$RELEASE_VERSION\].*? =(.*?)(\n){2}(?==)//s" readme.txt # Delete the existing changelog for the release version first fi - perl -i -pe "s/(== Changelog ==)/\1\n\n= [$RELEASE_VERSION] $RELEASE_DATE =\n\n$CHANGELOG/" readme.txt + sed_compatible -r "s|(== Changelog ==)|\1\n\n= [$RELEASE_VERSION] $RELEASE_DATE =\n\n$CHANGELOG|" readme.txt fi From d3f4030bff4f314fd63056ebb99c8a19410f1ad3 Mon Sep 17 00:00:00 2001 From: tec-bot Date: Tue, 10 Sep 2024 12:18:09 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/wo?= =?UTF-8?q?rkflows/lint.yml'=20with=20remote=20'templates/workflows/lint.y?= =?UTF-8?q?ml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0de312c1e5..83d3f42aec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,13 +6,12 @@ on: - 'src/modules/**.js' - 'src/resources/js/**.js' - 'src/resources/postcss/**.pcss' - - '.github/**/*' jobs: lint: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v4 + uses: actions/checkout@v2 with: fetch-depth: 1 submodules: recursive From 539248c7b6eb24d58632a6a65af3f2cf73003766 Mon Sep 17 00:00:00 2001 From: Stellar Bot <74736843+tec-bot@users.noreply.github.com> Date: Tue, 10 Sep 2024 08:21:00 -0400 Subject: [PATCH 3/3] :fast_forward: https://github.com/the-events-calendar/tribe-common/commit/716026654fef54e5d1240bc5a72dba0d697b1859 --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common b/common index e403964766..716026654f 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit e40396476690b9a9d08ac897e82a5d4deae35245 +Subproject commit 716026654fef54e5d1240bc5a72dba0d697b1859