guumaster / hostctl

Your dev tool to manage /etc/hosts like a pro!
http://guumaster.github.io/hostctl
MIT License
1.08k stars 47 forks source link

Test different installations #14

Closed guumaster closed 4 years ago

guumaster commented 4 years ago

There is a Github Action workflow that automatically generates packages for different systems. I can only test on Linux and Windows, so I need help to test all options:

Please add comments if you have tested it any version of this list. Thanks!

UPDATE: Finally the snap build is approved to have proper permissions :rocket: !

guumaster commented 4 years ago

@BarbUk Can you confirm that it can be installed on Arch Linux? thanks

BarbUk commented 4 years ago

For the last release, I don't see an archlinux package: image

hostctl_0.5.1_linux_64-bit.tar.gz is a linux binary that works on archlinux.

The package from https://aur.archlinux.org/packages/hostctl/ is built from the source code. Do you have an option in your Github Action workflow to update the aur package ?

guumaster commented 4 years ago

I can't find anything to automate it with Github. Did you create v0.5.1 manually or automatically? If it was automatically, I'm ok with it.

I have no experience with AUR, if you can elaborate how it is done, or point to a guide on how you did it, it'd be apreciated.

pacodes commented 4 years ago

Mac binary works

fivesmallq commented 4 years ago

hostctl_0.5.1_macOS_64-bit.tar.gz works fine on macOS 10.15.3

BarbUk commented 4 years ago

I can't find anything to automate it with Github. Did you create v0.5.1 manually or automatically? If it was automatically, I'm ok with it.

It's created automatically via a pkgbuild. The release is updated manually (release number and corresponding sha256).

I have no experience with AUR, if you can elaborate how it is done, or point to a guide on how you did it, it'd be apreciated.

See the pkgbuild here for info: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hostctl Updates done are visible here: https://aur.archlinux.org/cgit/aur.git/log/?h=hostctl

We can automate archlinux package creation to publish in your release page, but the package submission to aur must be done manually as far as I know.

The linux release is working for archlinux and other distribution, so people who want to try the app can download and use hostctl_0.5.1_linux_64-bit.tar.gz.

The aur package provide a way to install your app from an aur helper, i.e., yay -S hostctl

guumaster commented 4 years ago

@BarbUk thanks for the info and patience :+1:

We can automate archlinux package creation to publish in your release page, but the package submission to aur must be done manually as far as I know.

Understood, so, what part can I do on this repo to simplify your submission to AUR? Which file should be generated?

The linux release is working for archlinux and other distribution, so people who want to try the app can download and use hostctl_0.5.1_linux_64-bit.tar.gz.

Thanks! I've used Arch and AUR before, but never created a package myself.

devopsbrett commented 4 years ago

Hi, firstly let me thank you for a great tool, love it. Regarding #13 the current setup doesn't really follow brew best practices. You should create a new repo called homebrew-hostctl and place your Formula directory there (I know, seems pointless to create a whole repo just for that). With this change people would be able to run brew tap guumaster/hostctl. I can issue a pull request for the changes needed to your goreleaser file.

guumaster commented 4 years ago

thanks @devopsbrett. Please feel free to add the issue and I'll create the new repo to improve brew installation.

BarbUk commented 4 years ago

Understood, so, what part can I do on this repo to simplify your submission to AUR? Which file should be generated?

For the moment, I watch your repo to be notified when a new release is available and update the PKGBUILD.

I use a script, so it's definitely automatisable. You just need a private key to be able to push to aur:

#!/bin/bash

set -o errexit -o pipefail -o nounset

readonly new_release="$1"

sed -i "s/pkgver=.*$/pkgver=$new_release/" PKGBUILD
sed -i "s/sha256sums=.*$/$(makepkg -g 2>/dev/null)/" PKGBUILD

# Test build
makepkg -c

# Update srcinfo
makepkg --printsrcinfo > .SRCINFO

# Update aur
git add PKGBUILD .SRCINFO
git commit -m "Update to $new_release"
git push
guumaster commented 4 years ago

@BarbUk I've created an account on AUR and uploaded my ssh key. Can you add me as maintainer on hostctl repo so I can try to automate it? Thanks.

BarbUk commented 4 years ago

Done: https://aur.archlinux.org/packages/hostctl/

image

guumaster commented 4 years ago

@BarbUk after a long while of trial/error I was finally able to automate it :sweat:

I've created a new Github Action to manage the whole process, you can check it here in case you are interested on reading it or even improving it. (needs a bit of polishing and docs, but it works).

BarbUk commented 4 years ago

Looks good, thanks for taking the time to fully automate it.

spekulatius commented 4 years ago

Can confirm it works on elementary OS 5 using the deb file.

BarbUk commented 4 years ago

As per https://github.com/guumaster/hostctl/issues/42#issuecomment-612047879

If you wanna supply a hostctl-bin package, too, I would use it. Less carbon footprint.

Bin package is now available: https://aur.archlinux.org/packages/hostctl-bin/

@guumaster, you are co-maintainer of the package. No modification need to be done to the github action, but you need to call it for the hostctl-bin package too.

Let me know if I can help.