Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:hop-protocol/hop into production
Browse files Browse the repository at this point in the history
  • Loading branch information
shanefontaine committed May 18, 2024
2 parents 9d1aa7a + efbda59 commit edd32fe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
publish-docker:
name: Publish Docker
needs: publishable-packages
if: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages)[0] != '' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
publish-sdk:
name: Publish NPM
needs: publishable-packages
if: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages)[0] != '' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/publishable-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
publishable-packages:
runs-on: ubuntu-latest
outputs:
publishable-packages: ${{ steps.publishable-packages.outputs.modified_packages }}
publishable-packages: ${{ steps.publishable-packages.outputs.publishable_packages }}
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
Expand All @@ -44,7 +44,7 @@ jobs:
# Example: packages/hop-node,packages/v2-explorer-backend
IFS=":"
read -a input_packages <<< "${{ inputs.package-names }}"
modified_packages=""
publishable_packages=""

for package in "${input_packages[@]}"; do
package_path="packages/$package"
Expand All @@ -62,15 +62,19 @@ jobs:
fi
fi

modified_packages+="$package,"
publishable_packages+="$package,"
done

# Strip the trailing comma
# Example: packages/hop-node,packages/v2-explorer-backend
modified_packages="${modified_packages%,}"
publishable_packages="${publishable_packages%,}"

# Convert from string with commas to array for consumption by matrix
# Example: ["hop-node", "v2-explorer-backend"]
modified_packages=$(echo $modified_packages | tr ',' '\n' | sed 's/^ *//;s/ *$//' | jq -R -s -c 'split("\n")[:-1]')
if [ -z "$publishable_packages" ]; then
publishable_packages='[""]'
else
publishable_packages=$(echo $publishable_packages | tr ',' '\n' | sed 's/^ *//;s/ *$//' | jq -R -s -c 'split("\n")[:-1]')
fi

echo "modified_packages=$modified_packages" >> $GITHUB_OUTPUT
echo "publishable_packages=$publishable_packages" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/ui-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
needs: publishable-packages
runs-on: ubuntu-latest
# If the frontend hasn't been modified, skip
if: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages)[0] != null }}
if: ${{ fromJson(needs.publishable-packages.outputs.publishable-packages)[0] != '' }}
environment: ${{ matrix.env-name }}
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { config as goerli } from './goerli.js'
import { config as mainnet } from './mainnet.js'
import { config as sepolia } from './sepolia.js'

const cachebuster: number = 4
const cachebuster: number = 5

let sdkConfig: any = {}
const bondableChainsSet = new Set<string>([])
Expand Down

0 comments on commit edd32fe

Please sign in to comment.