-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bors): merge pull request #882
882: build(paperclip): support multiple platforms r=tiagolobocastro a=tiagolobocastro test(bdd/thin): fix racy thin prov test Add retry waiting for condition to be met. Signed-off-by: Tiago Castro <[email protected]> --- build(paperclip): support multiple platforms Supports building paperclip from multiple plaforms. Also updates old openapi update script to update paperclip. Signed-off-by: Tiago Castro <[email protected]> Co-authored-by: Tiago Castro <[email protected]>
- Loading branch information
Showing
6 changed files
with
87 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu -o pipefail | ||
|
||
SCRIPTDIR=$(dirname "$0") | ||
ROOTDIR="$SCRIPTDIR"/../.. | ||
|
||
OWNER="paperclip-rs"; | ||
REPO="paperclip"; | ||
REV=${REV:-} | ||
ARCH_OS=("x86_64-unknown-linux-musl" "aarch64-unknown-linux-musl" "x86_64-apple-darwin" "aarch64-apple-darwin") | ||
ARCH_OS_SHA256s="" | ||
|
||
|
||
github_rel_tag() { | ||
curl -sSf "https://api.github.com/repos/$OWNER/$REPO/releases/latest" | jq -r '.tag_name' | ||
} | ||
|
||
github_sha256() { | ||
tag="$1" | ||
arch_os="$2" | ||
nix-prefetch-url \ | ||
--type sha256 \ | ||
"https://github.com/$OWNER/$REPO/releases/download/$tag/paperclip-$arch_os.tar.gz" 2>&1 | \ | ||
tail -1 | ||
} | ||
|
||
echo "=== $OWNER/$REPO ===" | ||
|
||
echo -n "Looking up latest release for $OWNER/$REPO... " | ||
if [ -z "$REV" ]; then | ||
tag=$(github_rel_tag); | ||
else | ||
tag="$REV" | ||
fi | ||
echo "$tag" | ||
|
||
for arch_os in "${ARCH_OS[@]}"; do | ||
echo -n "Looking up sha25 for $arch_os... " | ||
sha256=$(github_sha256 "$tag" "$arch_os"); | ||
echo "$sha256" | ||
if [ "$ARCH_OS_SHA256s" != "" ]; then | ||
ARCH_OS_SHA256s="$ARCH_OS_SHA256s, | ||
" | ||
fi | ||
ARCH_OS_SHA256s="$ARCH_OS_SHA256s\"$arch_os\": \"$sha256\"" | ||
done | ||
|
||
source_file="$ROOTDIR/nix/pkgs/paperclip/source.json" | ||
|
||
echo "Previous Content of source file (``$source_file``):" | ||
cat "$source_file" | ||
echo "New Content of source file (``$source_file``) written." | ||
cat <<EOF >$source_file | ||
{ | ||
"owner": "$OWNER", | ||
"repo": "$REPO", | ||
"rev": "$tag", | ||
"hash": { | ||
$ARCH_OS_SHA256s | ||
} | ||
} | ||
EOF | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ mkShell { | |
jq | ||
llvmPackages.libclang | ||
nixpkgs-fmt | ||
nix | ||
openapi-generator-cli | ||
openssl | ||
pkg-config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters