Skip to content

Commit

Permalink
scripts: Add mkrelease script
Browse files Browse the repository at this point in the history
  • Loading branch information
TravMurav committed Aug 4, 2024
1 parent fee10c1 commit 225e888
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build*/
release/
37 changes: 37 additions & 0 deletions scripts/mkrelease.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2024 Nikita Travkin <[email protected]>

sign_everything() {
old_dir=$PWD
cd $1
sha256sum -- * > sha256sums.txt
gpg --yes --detach-sign sha256sums.txt
cd $old_dir
}

TAG=$(git describe)

echo "Generating \'$TAG\'"

BUILD_DIR="$PWD/build-$TAG"
BLOB_DIR="$PWD/release/$TAG"

make -j$(nproc) O="$BUILD_DIR"
mkdir -p "$BLOB_DIR"

cp $BUILD_DIR/*.efi "$BLOB_DIR"

git ls-files --recurse-submodules \
| tar --sort=name --mtime="@0" \
--owner=0 --group=0 --numeric-owner \
-caf "$BLOB_DIR/dtbloader-$TAG.tar.gz" -T-

sign_everything "$BLOB_DIR"

echo ==========================================================
echo Done building!
echo Now you can push the tag: "git push origin $TAG"
echo and upload the artifacts from "$BLOB_DIR"
echo ==========================================================

0 comments on commit 225e888

Please sign in to comment.