Skip to content

Fix AUR source directory in GoReleaser config#3

Open
Magniquick wants to merge 1 commit into
Graphixa:mainfrom
Magniquick:fix-aur-source-dir
Open

Fix AUR source directory in GoReleaser config#3
Magniquick wants to merge 1 commit into
Graphixa:mainfrom
Magniquick:fix-aur-source-dir

Conversation

@Magniquick
Copy link
Copy Markdown
Contributor

Summary

  • update the AUR GoReleaser hooks to run from ${srcdir}
  • fixes the generated PKGBUILD when the release source tarball extracts directly into the makepkg source directory

Verification

  • Applied the equivalent PKGBUILD patch locally and ran makepkg -f --cleanbuild --nodeps successfully for fontget 2.4.0-1
  • Verified the built binary reports FontGet v2.4.0

Copilot AI review requested due to automatic review settings April 19, 2026 14:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GoReleaser AUR source-package hooks so the PKGBUILD build steps run from ${srcdir}, fixing cases where the release source tarball extracts directly into the makepkg source directory (rather than a nested ${pkgname}_${pkgver} folder).

Changes:

  • Switch prepare, build, and package hooks from cd "${pkgname}_${pkgver}" to cd "${srcdir}".
  • Keep the rest of the AUR build environment/export logic unchanged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Owner

@Graphixa Graphixa left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. I agree that cd "${pkgname}_${pkgver}" can break when the source archive extracts directly into ${srcdir}.

We can control our release artifacts, but in practice the top level layout can still change over time (GoReleaser changes, config tweaks, or alternative source archives). I would prefer the AUR hooks to be resilient to either layout.

Suggested pattern for prepare, build, and package:

cd "${srcdir}" || exit 1
if [ -d "${pkgname}_${pkgver}" ]; then
  cd "${pkgname}_${pkgver}" || exit 1
fi
if [ ! -f "go.mod" ]; then
  echo "go.mod not found in ${PWD}"
  exit 1
fi

Once that is in, this looks good to me and I will merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants