Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✂️ a few simple fixes~ #82

Merged
merged 4 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

permissions:
contents: write
discussions: write
packages: read

jobs:
Expand Down Expand Up @@ -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 ]
Expand Down Expand Up @@ -244,7 +247,6 @@ jobs:
echo "::endgroup::"

echo "::group::Commit changes"
git add --all
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line did nothing since commit -a already stages all files~

git config --global user.name "FWDekkerBot"
git config --global user.email "bot@fwdekker.com"
git commit -am "🔖 mommy added package mommy $MOMMY_VERSION~"
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

---

Expand Down Expand Up @@ -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~
Expand Down
2 changes: 1 addition & 1 deletion src/main/man/man1/mommy.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/main/sh/mommy
Original file line number Diff line number Diff line change
Expand Up @@ -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")"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the only format that i could find that works universally on all systems~


capitalize "$prefix$template$suffix" "$6"
return 0
Expand Down
9 changes: 9 additions & 0 deletions src/test/sh/unit_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"

Expand Down
Loading