Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsenta committed Jun 8, 2023
1 parent 419aa24 commit 6b0a69e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Configure Kubo Gateway
run: |
ipfs init;
source ./gateway-conformance/kubo-config.example.sh;
IPFS_NS_MAP=$(cat ./fixtures/dnslinks.json | jq -r 'to_entries | map("\(.key).example.com:\(.value)") | join(",")')
source ./gateway-conformance/kubo-config.example.sh "$(pwd)/fixtures"
echo "Extract ns map:" $IPFS_NS_MAP;
echo "IPFS_NS_MAP=${IPFS_NS_MAP}" >> $GITHUB_ENV
# note: the IPFS_NS_MAP set above will be passed the daemon
- uses: ipfs/start-ipfs-daemon-action@v1
Expand Down
8 changes: 5 additions & 3 deletions kubo-config.example.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#! /usr/bin/env bash

FIXTURES_PATH=${1:-$(pwd)}

ipfs config --json Gateway.PublicGateways '{
"example.com": {
"UseSubdomains": true,
Expand All @@ -12,9 +15,8 @@ ipfs config --json Gateway.PublicGateways '{
}
}'

export IPFS_NS_MAP=$(cat ./dnslinks.json | jq -r '.subdomains | to_entries | map("\(.key).example.com:\(.value)") | join(",")')
export IPFS_NS_MAP="$(cat ./dnslinks.json | jq -r '.domains | to_entries | map("\(.key):\(.value)") | join(",")'),${IPFS_NS_MAP}"

export IPFS_NS_MAP=$(cat "${FIXTURES_PATH}/dnslinks.json" | jq -r '.subdomains | to_entries | map("\(.key).example.com:\(.value)") | join(",")')
export IPFS_NS_MAP="$(cat "${FIXTURES_PATH}/dnslinks.json" | jq -r '.domains | to_entries | map("\(.key):\(.value)") | join(",")'),${IPFS_NS_MAP}"

echo "Set the following IPFS_NS_MAP before starting the kubo daemon:"
echo "IPFS_NS_MAP=${IPFS_NS_MAP}"

0 comments on commit 6b0a69e

Please sign in to comment.