Skip to content

Commit

Permalink
🗑️ mommy removes obs and adds apt-mommy~
Browse files Browse the repository at this point in the history
  • Loading branch information
FWDekker committed Nov 28, 2023
1 parent 874b44a commit 0d409f4
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 130 deletions.
51 changes: 50 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- name: nop
run: true


build-linux:
needs: [ check-release-needed ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -198,6 +199,55 @@ jobs:
body_path: RELEASE_NOTES.md
files: mommy*

release-apt:
needs: [ release-mommy ]
runs-on: ubuntu-latest

steps:
- name: Download built packages
uses: actions/download-artifact@v3
with:
name: dist
- name: Checkout mommy
uses: actions/checkout@v4
- name: Checkout apt-mommy
uses: actions/checkout@v4
with:
repository: fwdekker/apt-mommy
token: ${{ secrets.personal_access_token }}
- name: Extract version number
run: echo "MOMMY_VERSION=v$(head -n 1 ./mommy/version)" >> $GITHUB_ENV
- name: Import GPG key
run: echo "$apt_gpg_private_key" | gpg --import
env:
apt_gpg_private_key: ${{ secrets.apt_gpg_private_key }}
- name: Update apt repository
run: |
echo "::group::Copy .deb into apt-mommy"
cp *.deb apt-mommy/deb/
echo "::endgroup::"
echo "::group::Update repo"
cd apt-mommy/
./update.sh
cd ../
echo "::endgroup::"
echo "::group::Commit update"
cd apt-mommy/
git add --all
git config --global user.name "FWDekkerBot"
git config --global user.email "[email protected]"
git commit -am "đź”– mommy added package mommy $MOMMY_VERSION~"
cd ../
echo "::endgroup::"
echo "::group::Push changes"
cd apt-mommy/
git push origin
cd ../
echo "::endgroup::"
release-aur:
needs: [ release-mommy ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -266,7 +316,6 @@ jobs:
sudo -u build git push origin master dev
echo "::endgroup::"
release-homebrew:
needs: [ release-mommy ]
runs-on: ubuntu-latest
Expand Down
66 changes: 48 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,33 @@ otherwise not satisfied?
<details>
<summary>debian/ubuntu/apt-based</summary>

subscribing to a repository (with automatic updates) [is planned](https://github.com/FWDekker/mommy/issues/53)~

* **apt** (automatic updates)
installs from the [mommy apt repository](https://github.com/FWDekker/apt-mommy).
the repository supports all architectures and suites~
1. register the repository in apt:
([more info](https://stackoverflow.com/a/71384057/))
```shell
sudo mkdir -p /etc/apt/keyrings/

wget -O- https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/Release.key | \
gpg --dearmor | \
sudo tee /etc/apt/keyrings/mommy.gpg > /dev/null

echo "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/null
```
2. (optional)
tell apt not to install any other packages from the mommy repo:
([more info](https://wiki.debian.org/DebianRepository/UseThirdParty#Standard_pinning))
```shell
echo -e "Package: *\nPin: origin o=mommy\nPin-Priority: 100" | \
sudo tee /etc/apt/preferences.d/pin-fwdekker-mommy > /dev/null
```
3. install mommy:
```shell
sudo apt update
sudo apt install mommy
```
* **homebrew** (automatic updates)
installs from the [mommy tap](https://github.com/FWDekker/homebrew-mommy).
(requires [brew](https://brew.sh/).)
Expand Down Expand Up @@ -211,20 +236,28 @@ subscribing to a repository (with automatic updates) [is planned](https://github
</details>
<details>
<summary>red hat/fedora/rpm-based</summary>
<summary>red hat/fedora/opensuse/rpm-based</summary>
since mommy is just a shell script these methods also work fine on opensuse~
* **dnf (copr)** (automatic updates)
installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/), allowing for automatic
updates.
installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/).
(requires the `dnf-plugins-core` package.)
```shell
sudo dnf copr enable fwdekker/mommy
sudo dnf install mommy
```
packages are signed by `fwdekker#[email protected]`, check for fingerprint
`E332 C8E6 ADAA 58E4 1974 7CE2 CE16 3CFF 9F79 DD8A`~
* **yum (copr)** (automatic updates)
installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/).
(requires the `yum-plugin-core` package.)
```shell
sudo yum copr enable fwdekker/mommy
sudo yum install mommy
```
packages are signed by `fwdekker#[email protected]`, check for fingerprint
`E332 C8E6 ADAA 58E4 1974 7CE2 CE16 3CFF 9F79 DD8A`~
* **homebrew** (automatic updates)
installs from the [mommy tap](https://github.com/FWDekker/homebrew-mommy).
(requires [brew](https://brew.sh/).)
Expand Down Expand Up @@ -624,7 +657,7 @@ if that annoys you, run `make build` after each change, and use `build/bin/mommy
### 🏬 distribution
mommy is distributed in three ways:
* attached as **binary packages** to each github release,
* built on **external build servers**,
* built on **build servers**,
* and available as **source builds** ("ports", basically) on a few servers.
let's go into them in more detail~
Expand Down Expand Up @@ -668,18 +701,15 @@ unfortunately, packages for macos, netbsd, and openbsd cannot be built on system
</details>
<details>
<summary>🏗️ external build servers</summary>
<summary>🏗️ build servers</summary>
build servers build mommy distributions on-demand for each release, and make the created packages available for all
users.
how sweet~
* [apt-mommy](https://github.com/FWDekker/apt-mommy) is a github-based apt repository that hosts mommy's `.deb` packages
after they have been built in [mommy's cd pipeline](https://github.com/FWDekker/mommy/actions/workflows/cd.yml)~
* [copr](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/) builds packages for fedora and epel~
* [openbuildservice](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy) builds packages for all
deb-based and rpm-based systems~
see [pkg/README.md](https://github.com/FWDekker/mommy/blob/main/pkg/README.md) for more information on the build
process~
</details>
<details>
Expand All @@ -696,7 +726,7 @@ users connect to the server, get the latest instructions, and their system build
</details>
### đź“Ż release
`main` always contains the latest stable version.
[`main`](https://github.com/FWDekker/mommy/tree/main) always contains the latest stable version.
every merge into `main` automatically build and releases a new version~
<details>
Expand All @@ -710,8 +740,6 @@ every merge into `main` automatically build and releases a new version~
* remove empty subsections for the new release~
* ensure no line breaks are used as whitespace;
github release notes use them as actual line breaks~
* update `pkg/obs/debian.changelog` if changes were made to obs's debian packaging process~
* update `pkg/obs/mommy.spec` if changes were made to obs's rpm packaging process~
* update `pkg/rpkg/mommy.spec.rpkg` if changes were made to copr's rpkg packaging process~
* update acknowledgements in `README.md`~
* update promotional images in `.github/img/`~
Expand All @@ -724,12 +752,12 @@ every merge into `main` automatically build and releases a new version~
* [copr](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/)
* updated automatically when `mommy` updates
* always [manually check deployment status](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/builds/)~
* [apt-mommy](https://github.com/FWDekker/apt-mommy/)
* updated automatically when `mommy` updates
* always [manually check deployment status](https://github.com/FWDekker/apt-mommy/commits/main)~
* [homebrew-mommy](https://github.com/FWDekker/homebrew-mommy)
* updated automatically when `mommy` updates
* always [manually check deployment status](https://github.com/FWDekker/homebrew-mommy/actions?query=branch%3Amain)~
* [openbuildservice](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy)
* updated automatically when `mommy` updates
* always [manually check deployment status](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy)~
</details>
### 🤠 contribution guidelines
Expand Down Expand Up @@ -769,3 +797,5 @@ if mommy should add, remove, or change anything here, [open an issue](https://gi
[several neat improvements](https://github.com/FWDekker/mommy/pull/61)~
* mommy thanks [aemogie.](https://github.com/aemogie) for
[telling her how to integrate with nushell](https://github.com/FWDekker/mommy/issues/65)~
* mommy thanks [maximilian downey twiss](https://github.com/Zopolis4) for
[bumping mommy's actions to their latest versions](https://github.com/FWDekker/mommy/pull/68)~
33 changes: 0 additions & 33 deletions pkg/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/obs/debian.changelog

This file was deleted.

1 change: 0 additions & 1 deletion pkg/obs/debian.compat

This file was deleted.

10 changes: 0 additions & 10 deletions pkg/obs/debian.control

This file was deleted.

12 changes: 0 additions & 12 deletions pkg/obs/debian.rules

This file was deleted.

7 changes: 0 additions & 7 deletions pkg/obs/mommy.dsc

This file was deleted.

43 changes: 0 additions & 43 deletions pkg/obs/mommy.spec

This file was deleted.

3 changes: 3 additions & 0 deletions pkg/rpkg/mommy.spec.rpkg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ make prefix="%{buildroot}/%{_prefix}/" install
%check
MOMMY_EXEC="%{buildroot}/%{_prefix}/bin/mommy" make shellspec_bin="%{_tmppath}/shellspec/shellspec" test/unit

%clean
rm -rf "%{_tmppath}/shellspec/"

%files
%{_bindir}/mommy
%doc %{_mandir}/man1/mommy.1.gz
Expand Down

0 comments on commit 0d409f4

Please sign in to comment.