Simple hello-world to use as an example
1.3K
This repository is to test out building an artifact and packaging it in a variety of formats, while also providing native package repositories.
This project is developed around shipping a compiled Go binary and uses GoReleaser to produce the artifacts. The functionality beyond the package creation should be fairly generic. I intend to create a separate project with the same goals but building artifacts more generically (without GoReleaser) instead.
All of this is an effort to better understand the packaging and distribution of software in popular package repositories and formats.
.tar.gz and .zip archives for each platformThe build.sh script drives this thing. I started with a
Makefile, but shell was more readable and cleaner. I'm using this for local
development and in the GitHub pipeline.
To build all the packages, generate repositories, and stage things under
dist/staging/, run the following:
./build.sh snapshot
To do a "production" release (the CI job runs
this).
./build.sh release
This sections describes how to install the packages that this repository produces.
You can download the .rpm files directly from the
GitHub Releases,
https://get.jbeard.dev/rpm, or add the repository (recommended):
Add this to /etc/yum.repos.d/jbeard.repo:
[helloworld]
name=Hello World
baseurl=https://get.jbeard.dev/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=https://get.jbeard.dev/gpg-pubkey.asc
dnf install hello-world
You can download the .deb files directly from the
GitHub Releases,
https://get.jbeard.dev/deb/pool/main, or add the repository (recommended):
Add GPG Key
wget -qO- https://get.jbeard.dev/gpg-pubkey.asc | gpg --dearmor > jbeard-repo-keyring.gpg
cat jbeard-repo-keyring.gpg | sudo tee /etc/apt/keyrings/jbeard-repo-keyring.gpg > /dev/null
Add Repository
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/jbeard-repo-keyring.gpg] https://get.jbeard.dev/deb stable main" |> \
sudo tee /etc/apt/sources.list.d/jbeard.list
Update APT sources and Install
sudo apt update
sudo apt install hello-world
Add the package repository:
echo -e '\n[hello-world]\nSigLevel = Optional TrustAll\nServer = https://get.jbeard.dev/archlinux/$arch' >> /etc/pacman.conf
Install the package:
pacman -Sy hello-world
The PKGBUILD is for installing the binary.
Download the build files:
curl -L https://get.jbeard.dev/aur/hello-world-bin.pkgbuild -o PKGBUILD
curl -L https://get.jbeard.dev/aur/hello-world-bin.srcinfo -o .SRCINFO
Build and install:
makepkg -si --noconfirm
brew install joshbeard/hello-world/hello-world
curl -sfL https://get.jbeard.dev/install.sh | sh -
The install script installs the binary to ~/.local/bin by default.
Set an INSTALL_DIR environment variable to override.
curl -sfL https://get.jbeard.dev/install.sh | INSTALL_DIR=/path/to/dir sh -
Content type
Image
Digest
sha256:5581d022b…
Size
559.2 kB
Last updated
over 2 years ago
docker pull joshbeard/hello-world