Skip to content

Commit

Permalink
review of #1278 and #1414
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Feb 20, 2023
1 parent 35276f7 commit ba7e0db
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
3 changes: 3 additions & 0 deletions otoroshi/conf/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/darwin-*
/linux-*
/native
2 changes: 2 additions & 0 deletions scripts/release/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ async function buildDistribution(version, where, releaseDir, releaseFile) {
await runScript(`
export JAVA_HOME=$JDK8_HOME
export PATH=\${JAVA_HOME}/bin:\${PATH}
cd ${where}
sh ./scripts/update-extism.sh
cd ${where}/otoroshi
sbt ";dist;assembly"
`, where);
Expand Down
39 changes: 39 additions & 0 deletions scripts/update-extism.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
EXTISM_VERSION=$(curl https://api.github.com/repos/extism/extism/releases/latest | jq -r '.name')

echo "latest extism version is: ${EXTISM_VERSION}"

rm -rfv ./otoroshi/conf/native
rm -rfv ./otoroshi/conf/darwin-*
rm -rfv ./otoroshi/conf/linux-*

mkdir ./otoroshi/conf/native

curl -L -o "./otoroshi/conf/native/libextism-aarch64-apple-darwin-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-aarch64-apple-darwin-${EXTISM_VERSION}.tar.gz"
curl -L -o "./otoroshi/conf/native/libextism-aarch64-apple-darwin-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-aarch64-apple-darwin-${EXTISM_VERSION}.tar.gz"
curl -L -o "./otoroshi/conf/native/libextism-x86_64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-x86_64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz"
curl -L -o "./otoroshi/conf/native/libextism-aarch64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-aarch64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz"
curl -L -o "./otoroshi/conf/native/libextism-x86_64-apple-darwin-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-x86_64-apple-darwin-${EXTISM_VERSION}.tar.gz"

mkdir ./otoroshi/conf/darwin-aarch64
mkdir ./otoroshi/conf/darwin-x86-64
mkdir ./otoroshi/conf/linux-aarch64
mkdir ./otoroshi/conf/linux-x86-64

tar -xvf "./otoroshi/conf/native/libextism-aarch64-apple-darwin-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/
mv ./otoroshi/conf/native/libextism.dylib ./otoroshi/conf/darwin-aarch64/libextism.dylib
tar -xvf "./otoroshi/conf/native/libextism-x86_64-apple-darwin-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/
mv ./otoroshi/conf/native/libextism.dylib ./otoroshi/conf/darwin-x86-64/libextism.dylib

tar -xvf "./otoroshi/conf/native/libextism-aarch64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/
mv ./otoroshi/conf/native/libextism.so ./otoroshi/conf/linux-aarch64/libextism.so
tar -xvf "./otoroshi/conf/native/libextism-x86_64-unknown-linux-gnu-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/
mv ./otoroshi/conf/native/libextism.so ./otoroshi/conf/linux-x86-64/libextism.so
rm -rfv ./otoroshi/conf/native


# curl -L -o "./otoroshi/conf/native/libextism-aarch64-unknown-linux-musl-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-aarch64-unknown-linux-musl-${EXTISM_VERSION}.tar.gz"
# tar -xvf "./otoroshi/conf/native/libextism-aarch64-unknown-linux-musl-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/
# curl -L -o "./otoroshi/conf/native/libextism-x86_64-pc-windows-gnu-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-x86_64-pc-windows-gnu-${EXTISM_VERSION}.tar.gz"
# curl -L -o "./otoroshi/conf/native/libextism-x86_64-pc-windows-msvc-${EXTISM_VERSION}.tar.gz" "https://github.com/extism/extism/releases/download/${EXTISM_VERSION}/libextism-x86_64-pc-windows-msvc-${EXTISM_VERSION}.tar.gz"
# mv ./otoroshi/conf/native/libextism.so ./otoroshi/conf/native/libextism-aarch64-unknown-linux-musl.so
# tar -xvf "./otoroshi/conf/native/libextism-x86_64-pc-windows-gnu-${EXTISM_VERSION}.tar.gz" --directory ./otoroshi/conf/native/

0 comments on commit ba7e0db

Please sign in to comment.