diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 90633d5..6d3b683 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 ] @@ -244,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" 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 4d94c11..236d151 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) --- @@ -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/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 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'"