Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: external build update for new generated code #264

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading