Skip to content

Commit

Permalink
fix: external build update for new generated code (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Curtish <ch@curtish.me>
  • Loading branch information
curtis-h authored Aug 14, 2024
1 parent 0d09ea7 commit 460102a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions externals/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ buildDIDComm() {
cd "${GenDIDComm}-wasm-browser"
if is_mac; then
sed -i '' "/if (typeof input === 'undefined') {/,/}/d" didcomm_js.js
sed -i '' "/if (typeof module_or_path === 'undefined') {/,/}/d" didcomm_js.js
else
sed -i "/if (typeof input === 'undefined') {/,/}/d" didcomm_js.js
sed -i "/if (typeof module_or_path === 'undefined') {/,/}/d" didcomm_js.js
fi

cd $ExternalsDir
Expand All @@ -70,9 +72,9 @@ buildJWT() {
#The code will fully work
cd "${GenJWERust}-wasm-browser"
if is_mac; then
sed -i '' "/if (typeof input === 'undefined') {/,/}/d" jwe_rust.js
sed -i '' "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" jwe_rust.js
else
sed -i "/if (typeof input === 'undefined') {/,/}/d" jwe_rust.js
sed -i "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" jwe_rust.js
fi

cd $ExternalsDir
Expand All @@ -95,9 +97,11 @@ buildAnonCreds() {
#The code will fully work
cd "${GenAnonCreds}-wasm-browser"
if is_mac; then
sed -i '' "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"
sed -i '' "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"

else
sed -i "/if (typeof input === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"
sed -i "/if (typeof \(input\|module_or_path\) === 'undefined') {/,/}/d" "./${AnonCreds}_wasm.js"

fi
cd $ExternalsDir
git submodule | grep $AnonCreds | awk '{print $1}' > "./${AnonCreds}.commit"
Expand Down

0 comments on commit 460102a

Please sign in to comment.