Skip to content

Commit

Permalink
fix and upgrade dockerfile dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Dec 17, 2023
1 parent a854f28 commit f5c33dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
wget https://github.com/tinygo-org/tinygo/releases/download/v0.27.0/tinygo_0.27.0_arm64.deb; \
dpkg -i tinygo_0.27.0_arm64.deb; \
curl -L -O "https://github.com/extism/js-pdk/releases/download/v0.3.4/extism-js-aarch64-linux-v0.3.4.gz"; \
curl -L -O "https://github.com/extism/js-pdk/releases/download/v0.3.4/extism-js-aarch64-linux-v0.5.0.gz"; \
else \
wget https://github.com/tinygo-org/tinygo/releases/download/v0.27.0/tinygo_0.27.0_amd64.deb; \
dpkg -i tinygo_0.27.0_amd64.deb; \
curl -L -O "https://github.com/extism/js-pdk/releases/download/v0.3.4/extism-js-x86_64-linux-v0.3.4.gz"; \
curl -L -O "https://github.com/extism/js-pdk/releases/download/v0.3.4/extism-js-x86_64-linux-v0.5.0.gz"; \
fi

RUN gunzip extism-js*.gz
Expand Down
5 changes: 4 additions & 1 deletion server/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ const unzip = (isRustBuild, zipString, outputFolder, rules = []) => {
filePath = entry.entryName === 'Cargo.toml' ? '' : 'src';
}

console.log(entry.entryName)

fs.writeFile(
path.join(process.cwd(), 'build', outputFolder, filePath, entry.entryName.split('/').slice(-1).join('/')),
// path.join(process.cwd(), 'build', outputFolder, filePath, entry.entryName.split('/').slice(-1).join('/')),
path.join(process.cwd(), 'build', outputFolder, filePath, entry.entryName),
rules.reduce((acc, rule) => {
return acc.replace(new RegExp(rule.key, "g"), rule.value)
}, content)
Expand Down

0 comments on commit f5c33dc

Please sign in to comment.