Skip to content

Commit

Permalink
chore: detect musl in lib downloader for shasum check, should probabl…
Browse files Browse the repository at this point in the history
…y just be an alpine check
  • Loading branch information
YOU54F committed Feb 22, 2024
1 parent 118ff5b commit e145b66
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 11 deletions.
20 changes: 18 additions & 2 deletions build/download-native-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,24 @@ download_native() {
shasum -a 256 --check --quiet "$path/$dest_file.sha256"
else
sed -Ei "s|../release_artifacts/.+$|$path/$dest_file|" "$path/$dest_file.sha256"
# sha256sum -c -s "$path/$dest_file.sha256"
sha256sum --check --quiet "$path/$dest_file.sha256"
if [[ "$OSTYPE" == "linux"* ]]; then
if ldd /bin/ls >/dev/null 2>&1; then
ldd_output=$(ldd /bin/ls)
case "$ldd_output" in
*musl*)
sha256sum -c -s "$path/$dest_file.sha256"
;;
*)
sha256sum --check --quiet "$path/$dest_file.sha256"
;;
esac
else
sha256sum --check --quiet "$path/$dest_file.sha256"
fi
else
sha256sum --check --quiet "$path/$dest_file.sha256"
fi

fi

rm "$path/$dest_file.sha256"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,40 @@
},
"type": "Synchronous/HTTP"
},
{
"description": "a request for an order with an unknown ID",
"pending": false,
"request": {
"headers": {
"Accept": [
"application/json"
]
},
"method": "GET",
"path": "/api/orders/404"
},
"response": {
"status": 404
},
"type": "Synchronous/HTTP"
},
{
"description": "a request for an order with an unknown ID",
"pending": false,
"request": {
"headers": {
"Accept": [
"application/json"
]
},
"method": "GET",
"path": "/api/orders/404"
},
"response": {
"status": 404
},
"type": "Synchronous/HTTP"
},
{
"description": "a request to update the status of an order",
"pending": false,
Expand Down Expand Up @@ -131,6 +165,54 @@
},
"type": "Synchronous/HTTP"
},
{
"contents": {
"content": {
"id": 1
},
"contentType": "application/json",
"encoded": false
},
"description": "an event indicating that an order has been created",
"matchingRules": {
"body": {
"$.id": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
}
}
},
"pending": false,
"type": "Asynchronous/Messages"
},
{
"contents": {
"content": {
"id": 1
},
"contentType": "application/json",
"encoded": false
},
"description": "an event indicating that an order has been created",
"matchingRules": {
"body": {
"$.id": {
"combine": "AND",
"matchers": [
{
"match": "integer"
}
]
}
}
},
"pending": false,
"type": "Asynchronous/Messages"
},
{
"contents": {
"content": {
Expand Down Expand Up @@ -158,7 +240,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.17",
"ffi": "0.4.16",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v2-consumer-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v3-consumer-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"language": "C#"
},
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v3-message-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v3-server-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v4-combined-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
"language": "C#"
},
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PactNet.Tests/data/v4-consumer-integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
],
"metadata": {
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"language": "C#"
},
"pactRust": {
"ffi": "0.4.16",
"ffi": "0.4.17",
"models": "1.1.19"
},
"pactSpecification": {
Expand Down

0 comments on commit e145b66

Please sign in to comment.