adjustment to the kodi build alias code
This commit is contained in:
parent
458071f671
commit
1c9af289cd
1 changed files with 14 additions and 11 deletions
25
README.md
25
README.md
|
|
@ -22,22 +22,25 @@ sudo dnf install -y tmt+all
|
|||
## If not provided create koji build and set env variable
|
||||
you can use the following allias to create build and set env automatically:
|
||||
```bash
|
||||
alias scratchbuild='function _scratchbuild() { \
|
||||
SRC_RPM=$(ls *.src.rpm | head -n 1); \
|
||||
|
||||
alias scratchbuild='set -x; \
|
||||
SRC_RPM=$(ls *.src.rpm | head -n 1) && \
|
||||
echo "Found source RPM: $SRC_RPM" && \
|
||||
if [ -z "$SRC_RPM" ]; then \
|
||||
echo "No source RPM file found in the current directory."; \
|
||||
echo "No source RPM file found."; \
|
||||
return 1; \
|
||||
fi; \
|
||||
BUILD_OUTPUT=$(koji build --scratch rawhide $SRC_RPM 2>&1); \
|
||||
KOJI_TASK_ID=$(echo "$BUILD_OUTPUT" | grep -oP "(?<=Task ID: )[0-9]+"); \
|
||||
if [[ -n $KOJI_TASK_ID ]]; then \
|
||||
export KOJI_TASK_ID=$KOJI_TASK_ID; \
|
||||
echo "Scratch build completed. Task ID: $KOJI_TASK_ID"; \
|
||||
fi && \
|
||||
BUILD_OUTPUT=$(koji build --scratch rawhide $SRC_RPM 2>&1) && \
|
||||
echo "Koji build output: $BUILD_OUTPUT" && \
|
||||
KOJI_TASK_ID=$(echo "$BUILD_OUTPUT" | grep -oP "(?<=Task ID: )[0-9]+") && \
|
||||
if [ -n "$KOJI_TASK_ID" ]; then \
|
||||
export KOJI_TASK_ID="$KOJI_TASK_ID"; \
|
||||
echo "Scratch build started. Task ID: $KOJI_TASK_ID"; \
|
||||
else \
|
||||
echo "Failed to extract Task ID."; \
|
||||
echo "Failed to extract Task ID. Build output: $BUILD_OUTPUT"; \
|
||||
return 1; \
|
||||
fi; \
|
||||
}; _scratchbuild'
|
||||
set +x'
|
||||
```
|
||||
|
||||
check what test plans and sub plans are available:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue