add custom changed_aports
This commit is contained in:
parent
d3ae459fa7
commit
45ad40dc49
1 changed files with 19 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/usr/local/bin/build.sh.orig b/usr/local/bin/build.sh
|
diff --git a/usr/local/bin/build.sh.orig b/usr/local/bin/build.sh
|
||||||
old mode 100644
|
old mode 100644
|
||||||
new mode 100755
|
new mode 100755
|
||||||
index c3b8f7a..1bc2dc2
|
index c3b8f7a..9df8db4
|
||||||
--- a/usr/local/bin/build.sh.orig
|
--- a/usr/local/bin/build.sh.orig
|
||||||
+++ b/usr/local/bin/build.sh
|
+++ b/usr/local/bin/build.sh
|
||||||
@@ -7,13 +7,14 @@
|
@@ -7,13 +7,14 @@
|
||||||
|
@ -21,7 +21,7 @@ index c3b8f7a..1bc2dc2
|
||||||
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
|
: "${MAX_ARTIFACT_SIZE:=300000000}" #300M
|
||||||
: "${CI_DEBUG_BUILD:=}"
|
: "${CI_DEBUG_BUILD:=}"
|
||||||
|
|
||||||
@@ -67,13 +68,22 @@ report() {
|
@@ -67,13 +68,32 @@ report() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_release() {
|
get_release() {
|
||||||
|
@ -39,15 +39,25 @@ index c3b8f7a..1bc2dc2
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
+# hack to have vanilla changed-aports work
|
+changed_aports() {
|
||||||
+changed_repos() {
|
+ : "${APORTSDIR?APORTSDIR missing}"
|
||||||
+ echo "."
|
+ : "${BASEBRANCH?BASEBRANCH missing}"
|
||||||
|
+
|
||||||
|
+ cd "$APORTSDIR"
|
||||||
|
+ local aports
|
||||||
|
+
|
||||||
|
+ aports=$(git diff --name-only --diff-filter=ACMR \
|
||||||
|
+ "$BASEBRANCH"...HEAD -- "*/APKBUILD" | xargs -rn1 dirname)
|
||||||
|
+
|
||||||
|
+ # shellcheck disable=2086
|
||||||
|
+ ap builddirs -d "$APORTSDIR" $aports 2>/dev/null | xargs -rn1 basename
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
+
|
+
|
||||||
build_aport() {
|
build_aport() {
|
||||||
local repo="$1" aport="$2"
|
local repo="$1" aport="$2"
|
||||||
cd "$APORTSDIR/$repo/$aport"
|
cd "$APORTSDIR/$repo/$aport"
|
||||||
@@ -99,13 +109,13 @@ set_repositories_for() {
|
@@ -99,13 +119,13 @@ set_repositories_for() {
|
||||||
local release
|
local release
|
||||||
|
|
||||||
release=$(get_release)
|
release=$(get_release)
|
||||||
|
@ -64,7 +74,7 @@ index c3b8f7a..1bc2dc2
|
||||||
doas apk update
|
doas apk update
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +128,15 @@ apply_offset_limit() {
|
@@ -118,7 +138,15 @@ apply_offset_limit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_system() {
|
setup_system() {
|
||||||
|
@ -81,7 +91,7 @@ index c3b8f7a..1bc2dc2
|
||||||
doas apk -U upgrade -a || apk fix || die "Failed to up/downgrade system"
|
doas apk -U upgrade -a || apk fix || die "Failed to up/downgrade system"
|
||||||
abuild-keygen -ain
|
abuild-keygen -ain
|
||||||
doas sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
|
doas sed -i -E 's/export JOBS=[0-9]+$/export JOBS=$(nproc)/' /etc/abuild.conf
|
||||||
@@ -192,32 +210,22 @@ section_end setup
|
@@ -192,32 +220,22 @@ section_end setup
|
||||||
build_start=$CI_ALPINE_BUILD_OFFSET
|
build_start=$CI_ALPINE_BUILD_OFFSET
|
||||||
build_limit=$CI_ALPINE_BUILD_LIMIT
|
build_limit=$CI_ALPINE_BUILD_LIMIT
|
||||||
|
|
||||||
|
@ -93,7 +103,7 @@ index c3b8f7a..1bc2dc2
|
||||||
- changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
|
- changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
|
||||||
+set_repositories_for $(get_qubes_release)
|
+set_repositories_for $(get_qubes_release)
|
||||||
+built_aports=0
|
+built_aports=0
|
||||||
+changed_aports_in_repo=$(changed_aports $BASEBRANCH $repo)
|
+changed_aports_in_repo=$(changed_aports $BASEBRANCH)
|
||||||
+changed_aports_in_repo_count=$(echo "$changed_aports_in_repo" | wc -l)
|
+changed_aports_in_repo_count=$(echo "$changed_aports_in_repo" | wc -l)
|
||||||
+changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
|
+changed_aports_to_build=$(echo "$changed_aports_in_repo" | apply_offset_limit "$build_start" "$build_limit")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue