From 574f5a57d2102e12b93e7cf4986949de3543e712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Gu=C3=A9rout?= Date: Sun, 10 Dec 2023 13:29:06 +0100 Subject: [PATCH] with retro 3 --- .github/workflows/ci.yml | 14 ++++++++------ .gitignore | 1 + .tools/build.sh | 21 ++++++++++++--------- tsconfig.cjs.json | 1 - tsconfig.json | 9 +++++---- tsconfig.test.json | 4 ++-- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ead3e43..25feed9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,11 @@ jobs: - run: npm test - run: npm run lint - run: npm run build + - run: cd build && tar -czf ../build.tar.gz * - uses: actions/upload-artifact@v3 with: - name: built-tests - path: dist/test/ + name: built-project + path: build.tar.gz test-legacy-versions: runs-on: ubuntu-latest @@ -31,10 +32,11 @@ jobs: node-version: ${{ matrix.node-version }} - uses: actions/download-artifact@v3 with: - name: built-tests - path: built-tests - - run: npm --prefix built-tests install - - run: npm --prefix built-tests test + name: built-project + - run: ls -la + - run: tar -xzf build.tar.gz -C build + - run: npm --prefix build install + - run: npm --prefix build test coverage: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 9935efc..eef210f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules/ .nyc_output/ .coverage/ .idea/ +build/ dist/ diff --git a/.tools/build.sh b/.tools/build.sh index f5cf269..14feb9c 100644 --- a/.tools/build.sh +++ b/.tools/build.sh @@ -2,33 +2,36 @@ set -euo pipefail readonly PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." +readonly BUILD_DIR="${PROJECT_DIR}/build" +readonly DIST_DIR="${PROJECT_DIR}/dist" -rm -rf "${PROJECT_DIR}/dist" +rm -rf "${DIST_DIR}" "${BUILD_DIR}" +mkdir -p "${DIST_DIR}" "${BUILD_DIR}" cd "${PROJECT_DIR}" -echo "Building oleoduc (esm version)..." +echo "Compiling oleoduc (esm version)..." tsc -p tsconfig.json -cat >"${PROJECT_DIR}/dist/mjs/package.json" <"${DIST_DIR}/mjs/package.json" <"${PROJECT_DIR}/dist/cjs/package.json" <"${DIST_DIR}/cjs/package.json" <