~earnestma/aptpkg-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH aptpkg v2] feat: Autobuild changed build files from git commit

Details
Message ID
<20211006223835.112584-1-me@earne.link>
DKIM signature
missing
Download raw message
Patch: +20 -0
---
 aptpkg | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/aptpkg b/aptpkg
index dc04f7b..b7876ef 100755
--- a/aptpkg
+++ b/aptpkg
@@ -15,6 +15,7 @@ Documentation: https://man.sr.ht/~earnestma/aptpkg

Usage:
	aptpkg [directory]
	aptpkg --auto (commit id)  Autobuild modified packages from commit
	aptpkg -h, --help          Show help
EOF
}
@@ -114,10 +115,29 @@ load_build(){
	esac
}

# Autobuild packages based on git list files changed in commit
# latest (HEAD) assumed if commit hash not provided
change_autobuild_pkgs(){
	[ -d .git ] || error_usage_die "Current directory is not a git repository!"

	commitid=$1
	[ -n "$commitid" ] || commitid=HEAD

	build_chg=$(git diff-tree --no-commit-id --name-only -r $commitid | grep "build" | sed 's#/build##')
	echo "Using $commitid with files $build_chg"

	for f in $build_chg; do
		aptpkg "$f"
	done
}

# Run!
case $1 in
	-h|--help)
		show_help ;;
	--auto)
		shift
		change_autobuild_pkgs "$1" ;;
	*)
		if [ $# -ne 1 ]; then
			error_usage_die "You must provide one directory"
-- 
2.30.2

[aptpkg/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CESOO3OHJQPL.KYALFGBGPUB4@cirno>
In-Reply-To
<20211006223835.112584-1-me@earne.link> (view parent)
DKIM signature
missing
Download raw message
aptpkg/patches/.build.yml: SUCCESS in 18s

[feat: Autobuild changed build files from git commit][0] v2 from [earnest ma][1]

[0]: https://lists.sr.ht/~earnestma/aptpkg-devel/patches/25576
[1]: me@earne.link

✓ #602825 SUCCESS aptpkg/patches/.build.yml https://builds.sr.ht/~earnestma/job/602825

Re: [aptpkg/patches/.build.yml] build success

Details
Message ID
<b55160c6-6170-75be-dd22-b973c7c14fb7@earne.link>
In-Reply-To
<CESOO3OHJQPL.KYALFGBGPUB4@cirno> (view parent)
DKIM signature
missing
Download raw message

      
Reply to thread Export thread (mbox)