diff --git a/.gitignore b/.gitignore index 8da772d4..aaa006e9 100644 --- a/.gitignore +++ b/.gitignore @@ -107,4 +107,4 @@ build prebuilds yarn.lock -libddwaf +#libddwaf diff --git a/libddwaf/libddwaf-1.20.1-aarch64-linux-musl-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-aarch64-linux-musl-c03e4f9.tar.gz new file mode 100644 index 00000000..e647fc82 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-aarch64-linux-musl-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-armv7-linux-musl-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-armv7-linux-musl-c03e4f9.tar.gz new file mode 100644 index 00000000..d8b0dd6c Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-armv7-linux-musl-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-darwin-arm64-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-darwin-arm64-c03e4f9.tar.gz new file mode 100644 index 00000000..901b75af Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-darwin-arm64-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-darwin-universal-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-darwin-universal-c03e4f9.tar.gz new file mode 100644 index 00000000..233b97b7 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-darwin-universal-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-darwin-x86_64-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-darwin-x86_64-c03e4f9.tar.gz new file mode 100644 index 00000000..994bc374 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-darwin-x86_64-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-windows-win32-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-windows-win32-c03e4f9.tar.gz new file mode 100644 index 00000000..75bf5528 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-windows-win32-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-windows-x64-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-windows-x64-c03e4f9.tar.gz new file mode 100644 index 00000000..d80d6679 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-windows-x64-c03e4f9.tar.gz differ diff --git a/libddwaf/libddwaf-1.20.1-x86_64-linux-musl-c03e4f9.tar.gz b/libddwaf/libddwaf-1.20.1-x86_64-linux-musl-c03e4f9.tar.gz new file mode 100644 index 00000000..556fac95 Binary files /dev/null and b/libddwaf/libddwaf-1.20.1-x86_64-linux-musl-c03e4f9.tar.gz differ diff --git a/scripts/setup.js b/scripts/setup.js index a8a0f1a9..ff6c9069 100644 --- a/scripts/setup.js +++ b/scripts/setup.js @@ -4,36 +4,41 @@ **/ 'use strict' // const assert = require('assert') -const childProcess = require('child_process') +// const childProcess = require('child_process') const fs = require('fs') const path = require('path') const tar = require('tar') -const pkg = require('../package.json') +// const pkg = require('../package.json') -const libddwafVersion = process.argv[2] || pkg.libddwaf_version +// const libddwafVersion = process.argv[2] || pkg.libddwaf_version // only relevant if libddwaf repo is private // assert(process.env.GH_TOKEN, 'GH_TOKEN must be set') const libddwafFolder = path.join(__dirname, '..', 'libddwaf') -fs.mkdirSync(libddwafFolder, { recursive: true }) +// fs.mkdirSync(libddwafFolder, { recursive: true }) -childProcess.spawnSync('gh', [ - 'release', 'download', - '--repo', 'DataDog/libddwaf', - '--dir', libddwafFolder, - '--pattern', `libddwaf-${libddwafVersion}-*-linux-musl.tar.gz`, - '--pattern', `libddwaf-${libddwafVersion}-darwin-*.tar.gz`, - '--pattern', `libddwaf-${libddwafVersion}-windows-*.tar.gz`, - libddwafVersion -]) +// childProcess.spawnSync('gh', [ +// 'release', 'download', +// '--repo', 'DataDog/libddwaf', +// '--dir', libddwafFolder, +// '--pattern', `libddwaf-${libddwafVersion}-*-linux-musl.tar.gz`, +// '--pattern', `libddwaf-${libddwafVersion}-darwin-*.tar.gz`, +// '--pattern', `libddwaf-${libddwafVersion}-windows-*.tar.gz`, +// libddwafVersion +// ]) for (const name of fs.readdirSync(libddwafFolder)) { const file = path.join(libddwafFolder, name) - tar.x({ file, cwd: libddwafFolder, sync: true }) fs.rmSync(file) } + +for (const name of fs.readdirSync(libddwafFolder)) { + const newDir = path.join(libddwafFolder, name) + const renamedDir = newDir.substring(0, newDir.indexOf('-c03e4f9')) + fs.renameSync(newDir, renamedDir) +}