Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

mommy's here to support you, in any shell, on any system~ ❤️

License

NotificationsYou must be signed in to change notification settings

FWDekker/mommy

Repository files navigation

github latest releasemommy is on aurgithub ci statusmommy is licensed under unlicense


🚚 installation | 📖 usage | 🙋 configuration | 🐚 shell integration | ⚗️ development | 💖 acknowledgements


mommy's here to support you!mommy will compliment you if things go well, and will encourage you if things are not goingso well~

mommy is fully customizable, integrates with any shell, works on any system, and most importantly, loves you verymuch~ ❤️

a command-line interface showing the text 'it's okay to make mistakes' after the user has failed to enter their password correctly three times in a row

🚚 installationtop ▲

mommy works on any system.mommy is tested on ubuntu, debian, archlinux, fedora, nixpkgs, macos, freebsd, netbsd, openbsd, and windows~

don't see your favourite distro or package manager listed?need help?otherwise not satisfied?please open an issue~

👩‍💼 with a package manager

find your operating system and package manager for the right instructions~

alpine linux
  • homebrew (automatic updates)
    installs from themommy tap.(requiresbrew.)
    brew tap fwdekker/mommybrew install mommy
    after installing, check thebrew documentation on how to enable shell completions~
  • apk (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*\.apk"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo apk add --allow-untrusted ./mommy-*.apk
arch linux
  • arch user repository (automatic updates)
    installs from thearch user repository, allowing for automatic updates.you should probably usean aur helper to do this:
    # if you use yayyay -S mommy# if you use paruparu -S mommy# if you use auraaura -A mommy# and so on
  • homebrew (automatic updates)
    installs from themommy tap.(requiresbrew.)
    brew tap fwdekker/mommybrew install mommy
    after installing, check thebrew documentation on how to enable shell completions~
  • pacman (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*\.pacman"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo pacman -U ./mommy-*.pacman
debian/ubuntu/apt-based
  • apt ≥2.2.4 (automatic updates)
    this method requires apt v2.2.4 or newer.check your version of apt withapt -v~

    installs from themommy apt repository.the repository supports all architectures and suites~

    sudo curl -fsSo /etc/apt/sources.list.d/mommy.sources \  https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/mommy.sourcessudo apt updatesudo apt install mommy
  • apt <2.2.4 (automatic updates)
    this method works on all versions of apt~

    installs from themommy apt repository.the repository supports all architectures and suites~

    check this page for details on what this code does~

    sudo mkdir -m 0755 -p /etc/apt/keyrings/curl -fsSL https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/Release.key|  sudo gpg --dearmor -o /etc/apt/keyrings/mommy.gpgecho"deb [signed-by=/etc/apt/keyrings/mommy.gpg] https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/ ./"|  sudo tee /etc/apt/sources.list.d/mommy.list> /dev/nullsudo apt updatesudo apt install mommy
  • homebrew (automatic updates)
    installs from themommy tap.(requiresbrew.)

    brew tap fwdekker/mommybrew install mommy

    after installing, check thebrew documentation on how to enable shell completions~

  • apt (github release) (manual updates)

    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*\.deb"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo apt install ./mommy*.deb
freebsd
  • pkg (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*\.freebsd"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo pkg add ./mommy-*.freebsd
macos
  • homebrew (automatic updates)
    installs from themommy tap.(requiresbrew.)

    brew tap fwdekker/mommybrew install mommy

    after installing, check thebrew documentation on how to enable shell completions~

    if you installed thefish shell from outsidebrew, you must add the following to your~/.config/fish/config.fish to enable shell completions for mommy:

    iftest -d (brew --prefix)"/share/fish/completions"set -p fish_complete_path (brew --prefix)"/share/fish/completions"end
  • pkg (github release) (manual updates)

    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*osx\.pkg"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo installer -pkg ./mommy*+osx.pkg -target /

    if you installed thefish shell usingbrew, you must add the following to your~/.config/fish/config.fish to enable shell completions for mommy:

    iftest -d /usr/local/share/fish/vendor_completions.d/set -p fish_complete_path /usr/local/share/fish/vendor_completions.d/end
netbsd
  • pkg_add (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*netbsd\.tgz"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo pkg_add ./mommy-*+netbsd.tgz
nixpkgs/nixos
  • nix-shell (temporary)
    if you're curious but not ready for commitments, usenix-shell to temporarily install mommy:

    nix-shell -p mommy
  • home-manager (persistent)
    if you use home manager, install mommy by adding the following to your home manager configuration:

    home.packages=withpkgs;[mommy];

    you can configure mommy as follows:

    home.packages=withpkgs;[(mommy.override{mommySettings={sweetie="catgirl";}})];

    checkthe full list of configuration options.note that your nix configuration should use lowercase variable names~

  • nixos (persistent)
    install mommy by adding the following to your nixos configuration (usually in/etc/nixos/configuration.nix):

    environment.systemPackages=withpkgs;[mommy];

    you can configure mommy as follows:

    environment.systemPackages=withpkgs;[(mommy.override{mommySettings={sweetie="catgirl";}})];

    checkthe full list of configuration options.note that your nix configuration should use lowercase variable names~

openbsd
  • pkg_add (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*openbsd\.tgz"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo pkg_add -D unsigned ./mommy-*+openbsd.tgz
red hat/fedora/opensuse/rpm-based
  • dnf/yum (copr) (automatic updates)
    installs from thecopr repository.(requires thednf-plugins-core package.)
    sudo dnf coprenable fwdekker/mommysudo dnf install mommy
    packages are signed byfwdekker#mommy@copr.fedorahosted.org, check for fingerprintE332 C8E6 ADAA 58E4 1974 7CE2 CE16 3CFF 9F79 DD8A~
  • homebrew (automatic updates)
    installs from themommy tap.(requiresbrew.)
    brew tap fwdekker/mommybrew install mommy
    after installing, check thebrew documentation on how to enable shell completions~
  • dnf (github release) (manual updates)
    # download latest package from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*\.rpm"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# install packagesudo dnf install ./mommy-*.rpm
windows

forgit bash orcygwin, seethe instructions for using mommy without a package manager~

  • wsl (automatic or manual updates)
    follow any of the mommy installation instructions for your installed linux subsystem (default is ubuntu) orbuild mommy from source~
  • msys2 (automatic or manual updates)
    follow any of the mommy installation instructions forarch linux (exceptdo not use the arch user repositorymethod) orbuild mommy from source~

🐐 without a package manager

build from source and install

if you want to customise where and how mommy installs, you can just compile her code yourself~

  1. prerequisites

  2. clone repository

    git clone https://github.com/FWDekker/mommy.gitcd mommy
  3. install
    this step builds mommy's files and copies them into your system.the exact paths differ per system, so find the instructions that are right for your system.

    ℹ️ note
    if you want to install mommy only for the current user, addprefix='~/.local/' beforeinstall~

    💡 tip
    check themakefile for a list of all prefix variablesyou can override~

    • debian/ubuntu/apt-based
      sudo make install/deb
    • freebsd
      sudo gmake install/freebsd
    • macos
      sudo gmake install/osxpkg
    • netbsd
      sudo gmake install/netbsd
    • openbsd
      sudo gmake install/openbsd
    • windows
      sudo make install
    • all other unix systems
      sudo make install
  4. test (optional)
    if you want to make sure installation was successful, you can run tests usingshellspec.run the following from inside the cloned mommy repository

    git clone https://github.com/shellspec/shellspec.gitPATH="$(pwd)/shellspec/:$PATH" make system=1test

    some tests will be skipped, depending on which other programs you have installed~

  5. uninstall (optional)
    if you want to uninstall after runningmake install, just run the same command as in step 3, except you replaceinstall withuninstall.

    uninstall might not work completely if you installed a different version than the one you're uninstalling.for the best results, runmommy -v, check the version number, rungit checkout <the version>, and then performthe uninstallation~

use without installing

if you don't want to use a package manager but also don't want to bother withmakeing mommy, you can download auniversal build of mommy, and play around with that.this will not install any files onto your system.if you're here because you want to install mommy only for a specific user, the "build from source and install" optionis probably a better approach, though~

the script below downloads the latest stable release and extracts it for you.if you don't want to use curl, justcheck the latest release inyour browser and download the file ending in+generic.tar.gz manually~

# download latest archive from github releasecurl -s https://api.github.com/repos/FWDekker/mommy/releases/latest| grep"browser_download_url.*generic\.tar\.gz"| cut -d: -f 2,3| tr -d\"| xargs curl -sLOJ# extract archive to `mommy`tar -C ./ -xzf mommy-*.tar.gz# invoke mommy./mommy/usr/bin/mommy

🔮 what's next?

check outhow to use mommy, read all aboutways you can configure mommy, andintegrate mommy with your shell~

a command-line interface showing the text 'never give up, my love' after running a command that has failed, and showing the text 'mommy knew you could do it' after running a command that has succeeded

📖 usagetop ▲

mommy processes (the output status of) a command and compliments you if the command succeeds and encourages you if itfails~

Tip

therecommended way of long-term mommy usage is tointegrate mommy into your shell, somommy will run after every command you run~

💃 how to run

for reference, here's the three main ways to invoke mommy~

formatexamplewhen to use
mommy [command] ...mommy npm testif you want mommy to respond to a single command~
mommy -e [command]mommy -e "ls -l | wc -l"if you want mommy when using| or>, or need mommy in a script~
mommy -s [status]mommy -s $?if you already ran a command and want mommy's help afterwards~

🛸 extra options

additionally, mommy knows a few extra options, which you can use to discover who mommy is and to tell mommy whichconfiguration files she should use~

short optionlong optiondescription
-h--helpopens mommy's manual page~
-v--versiondisplays mommy's version information~
-1writes output to stdout instead of stderr~
-c <file>--config=<file>tells mommy that she should read yourconfig from<file>~
-d <dirs>--global-config-dirs=<dirs>setsglobal configuration dirs to the colon-separated list in<dirs>~

🙋 configurationtop ▲

mommy's behavior can be modified using config files.the easiest way to do so is to add your config to the file~/.config/mommy/config.sh.you can also set up a global config file that is applied to all users, by default in/etc/mommy/config.sh.read more about the way config files are loaded~

mommy supportsa lot of different settings.if you want to configure the value ofMOMMY_SWEETIE, add the following line to your config file:

MOMMY_SWEETIE="catgirl"

make sure youdo not put spaces around the=, and youdo put quotes (") around the value~

🔍 config file locations

when mommy runs, she will first load the system-wideglobal config file.after that, she will read the user-specificlocal config file, overriding the values from the global file~

  • to find theglobal config file, mommy runs the following procedure.
    1. mommy determines the list of global config dirs.
      1. if a list is specified using acommand-line option, that list is used.
      2. otherwise, the list consists of all directories in$XDG_CONFIG_DIRS, plus/etc/mommy, plus/usr/local/etc/mommy/.
    2. mommy traverses this list, and stops once she finds a directory that contains the fileconfig.sh.this file will be the global config file~
  • to find thelocal config file, mommy runs the following procedure.
    1. if a config file is specified using acommand-line option, that file is used.
    2. if$XDG_CONFIG_HOME is defined, the file$XDG_CONFIG_HOME/mommy/config.sh is used.
    3. otherwise,$HOME/.config/mommy/config.sh is used~
👛 list of all settings
variabledescriptionlist?default
MOMMY_CAREGIVERwhat mommy calls herselfyesmommy
MOMMY_PRONOUNSmommy's pronouns for herself. should be five words separated by spaces, as inthey them their theirs themself (subject, object, dependent possessive, independent possessive, reflexive). to use a literal whitespace inside a single pronoun, write%%_%%, as inye you%%_%%all y'all's yeers yeerselves. in general, since the last two of the five words (theirs andthemself) are relatively rare, you can also just give the first three words, and then the fourth and fifth words are auto-completed. sothey them their is the same asthey them their theirs themself. however, this will also result inhe him his becominghe him his hiss himself, so be carefulyesshe her her hers herself
MOMMY_SWEETIEwhat mommy calls youyes<username>
MOMMY_PREFIXwhat mommy puts at the start of each sentenceyes<empty>
MOMMY_SUFFIXwhat mommy puts at the end of each sentenceyes~
MOMMY_CAPITALIZE0 to start sentences in lowercase,1 for uppercase, anything else to change nothingno0
MOMMY_COLORcolor of mommy's text. you can use anyxterm color code, or writelolcat to uselolcat (install separately). specify multiple colors separated by/ to randomly select one. set to empty string for your terminal's default coloryes005
MOMMY_COMPLIMENTSdefault complimenttemplatesyes<various>
MOMMY_COMPLIMENTS_EXTRAadditional compliment templates you can specifyyes<empty>
MOMMY_COMPLIMENTS_ENABLED1 to enable compliments, anything else to disableno1
MOMMY_ENCOURAGEMENTSdefault encouragementtemplatesyes<various>
MOMMY_ENCOURAGEMENTS_EXTRAadditional encouragement templates you can specifyyes<empty>
MOMMY_ENCOURAGEMENTS_ENABLED1 to enable encouragements, anything else to disableno1
MOMMY_FORBIDDEN_WORDSmommy will never give outputs that match forbidden strings. each entry is expressed as anextended regex (see alsoman grep). to enforce this, mommy will filter out all templates that match at least one regex. as a failsafe, mommy will also check her final output after choosing andfilling in the template, and will output nothing if she finds a forbidden string. also, if you want, you can replace literal characters with their octal (not hex!) escape sequences; for example, you can write\0155\0157\0155 instead ofmomyes<empty>
MOMMY_IGNORED_STATUSESexit codes that mommy should never reply to. set to empty string to ignore nothingyes130
🪣 how to configure lists

some of these settings support lists.mommy chooses a random element from each list each time she is called by you.(except forMOMMY_FORBIDDEN_WORDS andMOMMY_IGNORED_STATUSES, where mommy always considers all elements of thelist.)in a list, elements are separated by a newline or by a/.to use a literal newline or slash, write%%N%% or%%S%%, respectively.elements that contain whitespace only, and elements that start with a# are ignored~

  • for example, if you set
    MOMMY_SWEETIE="girl/kitten"
    then mommy will sometimes call yougirl, and sometimeskitten~
  • if you set
    MOMMY_CAREGIVER="mommymummy/#daddy/care%%S%%giver"
    then mommy will call herselfmommy,mummy, orcare/giver, but notdaddy~
  • if you set
    MOMMY_PRONOUNS="she her her hers herself/they them their theirs themself"
    then mommy may choose betweenmommy knows she loves her girl andmommy knows they love their girl (but notmommy knows they love her girl)~
  • if you set
    MOMMY_FORBIDDEN_WORDS="cat/dog"
    then mommy will never use templates that containcat, and will never use templates that containdog~
🧬 how to configure templates

you can add alist of your own compliments to eitherMOMMY_COMPLIMENTS orMOMMY_COMPLIMENTS_EXTRA.there is a slight difference between the two lists:

  • if you want both the defaultand your own compliments, add your own compliments toMOMMY_COMPLIMENTS_EXTRA~
  • if you want your own compliments andnot the default compliments, add your own compliments toMOMMY_COMPLIMENTS~

and similarly so for encouragements~

inside compliments and encouragements, you can put placeholders that contain the random values that mommy chose.for example, if you add the compliment%%CAREGIVER%% loves you, and haveMOMMY_CAREGIVER=your mommy, then mommyoutputsyour mommy loves you~

variabledescriptionnote
%%CAREGIVER%%what mommy calls herself
%%THEY%%mommy's subject pronoun (e.g. they, she, he)
%%THEM%%mommy's object pronoun (e.g. them, her, he)
%%THEIR%%mommy's possessive pronoun (e.g. their, her, he)
%%SWEETIE%%what mommy calls you
%%N%%a newlinecan be used inside other variables
%%S%%a forward slash (/)can be used inside other variables
%%_%%a whitespacecan be used inside other variables

🐚 shell integrationtop ▲

instead of calling mommy for each command, you can fully integrate mommy with your shell to get mommy's output each timeyou run any command.here are some examples on how you can do that in various shells.recall that you can addMOMMY_COMPLIMENTS_ENABLED=0 to your mommy config file to disable compliments while keepingencouragements~

this is just a small list of possibilities.if you know of another way to integrate mommy, feel free to contribute them by opening a pull request!

🪅 bash

in bash you can setPROMPT_COMMAND to runmommy after each command.just add the following line to~/.bashrc:

PROMPT_COMMAND="mommy -1 -s\$?;$PROMPT_COMMAND"
bash showing the text 'it's okay to make mistakes' after running a command that has failed
🐟 fish

in fish you can have mommy output a message on the right side of your prompt by creating~/.config/fish/functions/fish_right_prompt.fish with the following contents:

functionfish_right_prompt    mommy -1 -s$statusend

if you have anoh my fish theme installed, check the docs of your theme tosee if there's an easy way to extend the theme's right prompt.if not, you can either overwrite it with the above code, or copy-paste the theme's code into your own config file andthen add mommy yourself~

fish shell showing the text 'it's okay to make mistakes' in the right prompt after running a command that has failed
📈 nushell

in nushell you can have mommy output a message on the right side of your prompt by adding the following line to your~/.config/nushell/config.nu file:

$env.PROMPT_COMMAND_RIGHT = {|| mommy -1 -s$env.LAST_EXIT_CODE }
nushell showing the text 'just a little further, mommy knows you can do it' in the right prompt after running a command that has failed
🪟 powershell

the exact instructions depend onhow and where you installed mommy~

  1. disable mommy's color output
    mommy's colors don't really work well in powershell, so you'll have to disable them~

    • wsl
      if you want to run mommy through wsl, openwsl and run
      # run this in wslmkdir -p~/.config/mommyecho"MOMMY_COLOR=">>~/.config/mommy/config.sh
    • git bash
      if you want to run mommy through git bash, run
      # run this in powershell[IO.Directory]::CreateDirectory("$HOME/.config/mommy")[IO.File]::WriteAllLines("$HOME/.config/mommy/config.sh","MOMMY_COLOR=''")
  2. test prompt
    change powershell's prompt to include mommy's message~

    • wsl
      if you want to run mommy through wsl, run
      # run this in powershellfunctionprompt {"$(wsl -e mommy -1 -s$([int][bool]::Parse(!$?)))>" }
    • git bash
      if you want to run mommy through git bash, and you downloaded mommy toC:\Users\username\mommy, run
      # run this in powershellfunctionprompt {"$(&"C:\Program Files\Git\bin\sh.exe""C:/Users/username/mommy" -1 -s$([int][bool]::Parse(!$?)))>" }
  3. save prompt
    now let's make this prompt persistent.in powershell, runnotepad $profile to open your powershell settings, and add thefunction prompt [...] line fromabove~

    ℹ️ note
    if you get an error that this file does not exist, runnew-item -itemtype file -path $profile -force to createit~

    ℹ️ note
    if you get an error that you cannot run local scripts, runSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine as admin, orsign the script~

  4. improve prompt
    the instructions above show the basics of using mommy in powershell.you can make it way cooler using a theme engine likeoh-my-posh.for example, you can use background colors or display mommy in the right prompt instead of the left~

🚀 starship

to configureoh-my-posh-like prompts (likebash,fish, andzsh), first create a custommommy module in your.config/starship.toml file:

[custom.mommy]command ="mommy -1 -s $status"when ="true"

you can place this anywhere in your starship arrangements.the above code is the mommy command from fish, but you can replace it with any of the mommy commands listed for another shell~

for example, add the following to your starship config to have mommy appear on your right prompt at all times~

right_format ="$custom"
starship with a left prompt with modules, and a right prompt with the custom mommy module, saying things like '*pets your head*' with empty commands.
💤 zsh

depending on where you want mommy's output, the instructions are a bit different.you can either get the output above your prompt, or aligned to the right~

above the prompt
to get mommy's output on a separate line above your prompt, add the following line to~/.zshrc:

precmd() { mommy -1 -s$? }

to the right of each command
to get mommy's output on the same line as your prompt, aligned to the right, add the following to~/.zshrc:

set -o PROMPT_SUBSTRPS1='$(mommy -1 -s $?)'# using single quotes here is required!

and add the following to your mommy config:

MOMMY_COLOR=""MOMMY_PREFIX="%F{005}/%F{006}"MOMMY_SUFFIX="~%f"

normally, mommy sets colors using standard ansi color codes, but zsh's support is a bit special, resulting in zshmiscalculating the prompt width, which looks like your prompt is misaligned or shifted.to fix this, you should disable mommy's color feature and manually set colors in the prefix option.to specify colors, use zsh's special syntax, where the numbers correspond to thexterm color codes.finally, the%f in the suffix resets the colors~

zsh showing the text 'never give up, my love' in the right prompt after running a command that has failed
🐌 other shells

as a generic method, in any posix shell (includingsh,ash,dash,bash) you can change the prompt itself tocontain a message from mommy by setting the$PS1 variable:

PS1="\$(mommy -1 -s\$?)$PS1"

to improve the spacing, setMOMMY_SUFFIX="~ " in mommy's config file.

add the above line to the config file for your shell (e.g..bashrc forbash) to apply it each time you open theshell.some shells (dash,pdksh) do not have a config file like.bashrc, but you can enable one by adding the followingline to~/.profile:

export ENV="$HOME/.shrc"

note that this will apply to all (non-login) posix shells that you open.after that, add the above-mentioned line that definesPS1 to~/.shrc.log out and back in, and mommy will appear in your shell~

✍️ renaming the mommy executable

if you use any of the above integrations, you don't have to call mommy directly.if you don't want that, but also don't want to writemommy, this section explains how you can instead write, say,daddy,marija, orsinterklaas~

mommy is installed in slightly different locations on different systems, but you can easily find where mommy isinstalled withwhereis mommy:

$ whereis mommymommy: /usr/bin/mommy /usr/share/man/man1/mommy.1.gz

the exact output ofwhereis differs depending on your system, but in this case you can see that the program isinstalled in/usr/bin/mommy (and the manual page in/usr/share/man/man1/mommy.1.gz).ifwhereis mommy doesn't work, mommy is not on your path, but you can still find her withfind / -name mommy~

anyway, after finding mommy, you can just symlink using the following commands:(ifwhereis gave different paths than the ones above, then change these commands accordingly)

sudo ln -fs /usr/bin/mommy /usr/bin/daddysudo ln -fs /usr/share/man/man1/mommy.1.gz /usr/share/man/man1/daddy.1.gz

[!IMPORTANT]uninstalling mommy will not remove the manually created symlinks~

⚗️ developmenttop ▲

this section explains how to build mommy from source, in case you want tohelp with development or for any other reason~

🎬 run

you can actually just directly run the script insrc/main/sh/mommy.the only difference will be that the-h and-v options may not work correctly.if that annoys you, runmake build after each change, and usebuild/bin/mommy instead~

🧪 tests
  1. requirements
    shellspec
  2. test local code
    1. all tests
      maketest
    2. unit tests
      make test/unit
    3. integration tests
      make test/integration
  3. test installed binary
    make system=1test
  4. configuration
    except forsystem=1, test behaviour is configured with environment variables.check the various files insrc/test/ to find 'em all~
🏬 distribution

mommy is distributed in three ways:

  • attached asbinary packages to each github release,
  • built onbuild servers,
  • and available assource builds ("ports", basically) on a few servers.

let's go into them in more detail~

  • 📦 binary packages
    the binary packages attached to the github release are built with themakefile.runmake list to see a list of build targets;you're looking for the ones starting withdist/~

    to build the packages, you need at least gnu make, ruby, andfpm.(actually, you don't need fpm for netbsd and openbsd.)on debian-based systems, you already have gnu make, so you only need

    sudo apt install rubysudo gem install fpm

    after that, just runmake dist/deb (or better:mommy make dist/deb), and a.deb package will be built indist/.runmake ormake list for a list of valid build targets.a special target isinstall, which directly copies the files into the specified directories on your system.these directories can be changed by settingprefix variables, as inmake prefix=/usr/ install.i recommend runningmake --dry-run prefix=/usr/ install first so you can verify that all directories are calculatedcorrectly.check themakefile for more details~

    all systems can build packages for themselves without additional dependencies beyond those noted above.if you want to compile for a different system than the one you're using, you may need additional dependencies.for example, if you want to build packages for alpine linux, archlinux, and rpm from a debian-like system, you willrespectively need

    sudo apt install libarchive-tools rpm zstd

    and then you can run

    make dist/apk dist/pacman dist/rpm

    unfortunately, packages for macos, netbsd, and openbsd cannot be built on systems other than themselves~

  • 🏗️ build servers
    build servers build mommy distributions on-demand for each release, and make the created packages available for allusers.how sweet~

    • apt-mommy is a github-based apt repository that hosts mommy's.debpackages after they have been built inmommy's cd pipeline~
    • copr builds packages for fedora and epel~
  • 🌱 source builds
    some servers host instructions on how to build mommy, but don't do any work beyond that.users connect to the server, get the latest instructions, and their system builds mommy for them locally~

📯 release

main always contains the latest stable version.to release a new version, just use thedeploy action,which can be activated using aworkflow_dispatch event~

release checklists

  • before triggering deployment

    • updateversion~
    • update all changelogs~
      • updateCHANGELOG.md~
        • do not leave a placeholder section for[unreleased], because it will end up like that in the.deb'schangelog.gz~
        • remove empty subsections for the new release~
        • ensure no line breaks are used as whitespace;github release notes use them as actual line breaks~
      • updatepkg/rpkg/mommy.spec.rpkg if changes were made to copr's rpkg packaging process~
      • updatepkg/fpm/deb.changelog if changes were made to fpm's debian packaging process~
      • updatepkg/fpm/rpm.changelog if changes were made to fpm's rpm packaging process~
    • update acknowledgements inREADME.md~
    • update promotional images in.github/img/~
  • after triggering deployment

💖 acknowledgementstop ▲

mommy recognisesall contributors, no matter the size of the contribution.if mommy should add, remove, or change anything here,open an issue orcontact the author~


[8]ページ先頭

©2009-2025 Movatter.jp