From 8421ef008756416ee9a46370d84b4f263858771f Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Wed, 29 Nov 2023 15:47:27 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=93=A2=20mommy=20improves=20her=20rel?= =?UTF-8?q?eases=20somewhat~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit specifically, mommy now correctly creates a discussions thread and creates the tag at 'main' instead of at 'dev'~ and she adds a few non-breaking spaces to the readme~ --- .github/workflows/cd.yml | 7 +++++-- README.md | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 90633d5..0315657 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -9,6 +9,7 @@ on: permissions: contents: write + discussions: write packages: read jobs: @@ -197,11 +198,13 @@ jobs: uses: softprops/action-gh-release@v1 if: github.event_name != 'workflow_dispatch' with: - draft: false - prerelease: false + target_commitish: main tag_name: ${{ env.MOMMY_VERSION }} body_path: RELEASE_NOTES.md files: mommy* + draft: false + prerelease: false + discussion_category_name: announcements release-apt: needs: [ release-mommy ] diff --git a/README.md b/README.md index 4d94c11..72631b2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ --- -๐Ÿšš [**installation**](#-installation) | ๐Ÿ“– [**usage**](#-usage) | ๐Ÿ™‹ [**configuration**](#-configuration) | ๐Ÿš [**shell integration**](#-shell-integration) | โš—๏ธ [**development**](#%EF%B8%8F-development) | ๐Ÿ’– [**acknowledgements**](#-acknowledgements) +๐Ÿšš [**installation**](#-installation) | ๐Ÿ“– [**usage**](#-usage) | ๐Ÿ™‹ [**configuration**](#-configuration) | ๐Ÿš [**shell integration**](#-shell-integration) | โš—๏ธ [**development**](#%EF%B8%8F-development) | ๐Ÿ’– [**acknowledgements**](#-acknowledgements) --- From 867a3a739867b60c251ba5e50b964312237417ab Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Wed, 29 Nov 2023 15:54:25 +0100 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=96=20mommy=20fixes=20the=20url=20?= =?UTF-8?q?in=20her=20man=20page~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/man/man1/mommy.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/man/man1/mommy.1 b/src/main/man/man1/mommy.1 index 640af72..cbd8c19 100644 --- a/src/main/man/man1/mommy.1 +++ b/src/main/man/man1/mommy.1 @@ -18,7 +18,7 @@ e.g. \fBmommy\fP -s $? .SH description -https://github.com/FWDekker/mommy/blob/%%VERSION_NUMBER%%/README.md +https://github.com/FWDekker/mommy/tree/v%%VERSION_NUMBER%%#readme .SH bugs From 07244098ecbaee3996d6c325a4c79711df7ac3c8 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Wed, 29 Nov 2023 16:12:56 +0100 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=AA=B9=20mommy=20adds=20support=20for?= =?UTF-8?q?=20newlines=20in=20templates~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ README.md | 1 + src/main/sh/mommy | 3 ++- src/test/sh/unit_spec.sh | 9 +++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 587cfd4..83eca52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog +## [Unreleased] +### added +* ๐Ÿชน mommy now supports newlines in templates using `%%N%%`~ ([#58](https://github.com/FWDekker/mommy/issues/58)) ([#82](https://github.com/FWDekker/mommy/issues/82)) + +### fixed +* ๐Ÿš’ mommy fixes the description url in her manual page~ ([#81](https://github.com/FWDekker/mommy/issues/81)) ([#82](https://github.com/FWDekker/mommy/issues/82)) + + ## [1.2.6] -- 2023-11-29 ### fixed * ๐Ÿš’ mommy fixes her apt repository release script~ ([#73](https://github.com/FWDekker/mommy/issues/73)) diff --git a/README.md b/README.md index 72631b2..236d151 100644 --- a/README.md +++ b/README.md @@ -501,6 +501,7 @@ outputs `your mommy loves you`~ | `%%THEM%%` | mommy's object pronoun (e.g. him, her, them) | | `%%THEIR%%` | mommy's possessive pronoun (e.g. his, her, their) | | `%%SWEETIE%%` | what mommy calls you | +| `%%N%%` | a newline | ### โœ๏ธ renaming the mommy executable if you want to write `daddy npm test` instead of `mommy npm test`, you can create a symlink~ diff --git a/src/main/sh/mommy b/src/main/sh/mommy index b92a8bc..004940c 100755 --- a/src/main/sh/mommy +++ b/src/main/sh/mommy @@ -181,7 +181,8 @@ fill_template() { -e "s/%%THEY%%/$they/g" \ -e "s/%%THEM%%/$them/g" \ -e "s/%%THEIR%%/$their/g" \ - -e "s/%%CAREGIVER%%/$caregiver/g")" + -e "s/%%CAREGIVER%%/$caregiver/g" \ + -e "s/%%N%%/\\$n/g")" capitalize "$prefix$template$suffix" "$6" return 0 diff --git a/src/test/sh/unit_spec.sh b/src/test/sh/unit_spec.sh index 912a888..01df62d 100755 --- a/src/test/sh/unit_spec.sh +++ b/src/test/sh/unit_spec.sh @@ -358,6 +358,15 @@ Describe "mommy" The status should be success End + It "replaces %%N%%" + set_config "MOMMY_COMPLIMENTS='>bottom%%N%%stimky<'" + + When run "$MOMMY_EXEC" -c "$MOMMY_CONFIG_FILE" true + The error should equal ">bottom +stimky<" + The status should be success + End + It "prepends the prefix" set_config "MOMMY_COMPLIMENTS='<';MOMMY_PREFIX='woolen'" From 09bb26712d5a0a69904c8d6d88a2635758db6799 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Wed, 29 Nov 2023 17:45:51 +0100 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=8F=B9=20mommy=20patches=20homebrew?= =?UTF-8?q?=20and=20aur=20during=20tests~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 - .github/workflows/ci.yml | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0315657..6d3b683 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -247,7 +247,6 @@ jobs: echo "::endgroup::" echo "::group::Commit changes" - git add --all git config --global user.name "FWDekkerBot" git config --global user.email "bot@fwdekker.com" git commit -am "๐Ÿ”– mommy added package mommy $MOMMY_VERSION~" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c6fa19..967c9b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,14 @@ jobs: repository: FWDekker/homebrew-mommy path: homebrew-mommy ref: dev + - name: Patch homebrew-mommy + working-directory: homebrew-mommy + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + # Point the formula to the commit that is being tested in this workflow + sed -i -e "s|head \(.*\), branch: .*|head \1, revision: \"$RELEVANT_SHA\"|g" mommy.rb + git -c user.name="ignore" -c user.email="ignore" commit -am "ignore" - name: Test Homebrew package run: | echo "::group::Enable Homebrew" @@ -161,9 +169,11 @@ jobs: run: chown -R build:build ./aur-mommy/ - name: Test AUR package working-directory: ./aur-mommy/ + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} run: | echo "::group::Patch" - sudo -u build ./update.sh dev + sudo -u build ./update.sh "$RELEVANT_SHA" echo "::endgroup::" echo "::group::Build and install" @@ -312,6 +322,14 @@ jobs: repository: FWDekker/homebrew-mommy path: homebrew-mommy ref: dev + - name: Patch homebrew-mommy + working-directory: homebrew-mommy + env: + RELEVANT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + run: | + # Point the formula to the commit that is being tested in this workflow + sed -i -e "s|head \(.*\), branch: .*|head \1, revision: \"$RELEVANT_SHA\"|g" mommy.rb + git -c user.name="ignore" -c user.email="ignore" commit -am "ignore" - name: Test Homebrew package run: | echo "::group::Enable Homebrew"