Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically update pkgver using makepkg #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

j-waters
Copy link

If a pkgver() function exists, the PKGBUILD file will be copied into a new temporary directory, makepkg -od will be run, and then the new PKGBUILD file will be the one that is copied into the aur repo.

makepkg -od:

  • -o skips building, but still runs pkgver()
  • -d skips dependency checks, which is fine as long as no dependencies (other than git) are used in the pkgver() function

build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
build.sh Outdated Show resolved Hide resolved
@j-waters j-waters force-pushed the update-pkgver branch 2 times, most recently from 9988ac9 to e6f7194 Compare August 30, 2021 00:59
@KSXGitHub
Copy link
Owner

It seems that you're busy. Notify me by @ mention when you're done.

@j-waters j-waters force-pushed the update-pkgver branch 2 times, most recently from bc58083 to 8befa3b Compare August 30, 2021 01:11
@yuezk
Copy link

yuezk commented Oct 16, 2021

Hi @KSXGitHub Is it ready to merge this PR?

Comment on lines +63 to +64
cd /tmp/makepkg;
makepkg -od;
Copy link
Owner

Choose a reason for hiding this comment

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

; is unnecessary.

if [ "$update_pkgver" = "true" ]; then
echo '::group::Updating pkgver'
echo 'Running `makepkg -od` to update pkgver'
mkdir -p /tmp/makepkg
Copy link
Owner

Choose a reason for hiding this comment

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

There's a command called mktemp that always exists (provided by the coreutils package). It is better to use that than mkdir -p /tmp/makepkg.

@yuezk
Copy link

yuezk commented Oct 17, 2021

@KSXGitHub I submitted another PR (#26) for updating the pkgver, it will work with the case where the PKGBUILD depends on the local source code tarballs in the package repository. Please also take a look. Thanks.

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.

None yet

3 participants