Skip to content

Commit

Permalink
CI Pipeline fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeeq committed Feb 18, 2020
1 parent 7cbba59 commit 6094cdd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
14 changes: 6 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

set -euf -o pipefail
set -eu -o pipefail

## Update fedora docker image tag, because kernel build is using `uname -r` when defining package version variable
FEDORA_KERNEL_GIT_URL=https://src.fedoraproject.org/rpms/kernel.git
FEDORA_KERNEL_VERSION=5.4.19
FEDORA_KERNEL_VERSION=5.4.20
FEDORA_KERNEL_BRANCH_NAME=f31
FEDORA_KERNEL_COMMIT_HASH=5c8a69fccaafcd260b85fd29d8b6289ebdf817b7 # https://src.fedoraproject.org/rpms/kernel/commits/f31
FEDORA_KERNEL_COMMIT_HASH=8bc294d7d740ce009af5cb2a3e13604dc551bfe5 # https://src.fedoraproject.org/rpms/kernel/commits/f31

### Debug commands
echo "FEDORA_KERNEL_VERSION=$FEDORA_KERNEL_VERSION"
Expand Down Expand Up @@ -70,11 +70,9 @@ echo >&2 "===]> Info: Bulding kernel ... ";
rpmbuild_exitcode=$?

### Copy artifacts to shared volume
find ~/rpmbuild/ | grep '\.rpm'
cp -rfv ~/rpmbuild/RPMS/x86_64/*.rpm /tmp/artifacts/

### Calculate sha256 sums of built RPMs
sha256sum ~/rpmbuild/RPMS/x86_64/*.rpm > /tmp/artifacts/sha256
echo >&2 "===]> Info: Copying rpms and calculating SHA256 ... ";
cp -rfv /root/rpmbuild/RPMS/x86_64/*.rpm /tmp/artifacts/
sha256sum /root/rpmbuild/RPMS/x86_64/*.rpm > /tmp/artifacts/sha256

### Add patches to artifacts
cd ..
Expand Down
2 changes: 1 addition & 1 deletion build_in_docker.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euf -o pipefail
set -eu -o pipefail

DOCKER_IMAGE=fedora:31
RPMBUILD_HOST_PATH=/opt/rpmbuild
Expand Down
7 changes: 2 additions & 5 deletions patch_driver.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euf -o pipefail
set -eu -o pipefail

### Apple T2 drivers commit hashes
# BCE_DRIVER_GIT_URL=https://github.com/MCMrARM/mbp2018-bridge-drv.git
Expand All @@ -24,10 +24,7 @@ cd mbp2018-etc || exit
git checkout ${APPLE_SMC_DRIVER_COMMIT_HASH}
cd ..
[ ! -d mbp2018-etc/applesmc/patches ] && { echo 'AppleSMC patches directory not found!'; exit 1; }
while IFS= read -r file; do
echo "adding ${file}"
cp -rfv "${file}" "${REPO_PWD}"/../patches/"${file##*/}"
done < <(find mbp2018-etc/applesmc/patches/ -type f)
cp -rfv mbp2018-etc/applesmc/patches/* "${REPO_PWD}"/../patches/

### Add custom drivers to kernel
# echo -e "From: fedora kernel <[email protected]>\nSubject: patch custom drivers\n" > "${REPO_PWD}"/../patches/custom-drivers.patch
Expand Down
2 changes: 1 addition & 1 deletion patch_kernel_manually.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euf -o pipefail
set -eu -o pipefail

### Apple T2 drivers commit hashes
KERNEL_VERSION=5.4.19-200.mbp.fc31.x86_64
Expand Down
2 changes: 1 addition & 1 deletion publish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euf -o pipefail
set -eu -o pipefail

# export HEROKU_API_KEY=
LATEST_RELEASE=$(curl -s https://github.com/mikeeq/mbp-fedora-kernel/releases/latest | cut -d'v' -f2 | cut -d'"' -f1)
Expand Down

0 comments on commit 6094cdd

Please sign in to comment.