From b9ad399cce5d0e85a5421c41f8efddb0e6e6ed56 Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 17:59:28 +0200 Subject: [PATCH 1/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/publish.yml | 7 +++++++ .github/workflows/quality-check.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8d222f7d..cc6bdb35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -59,6 +59,13 @@ jobs: "text": "Project: `${{ github.event.repository.name }}`" } }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Version: `${{ needs.build.outputs.version || 'TBA' }}`" + } + }, { "type": "section", "text": { diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index f423ddfe..84c8a3b1 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -22,3 +22,10 @@ jobs: run: | bun i bash .github/workflows/scripts/quality.sh + - name: Extract version from package.json + id: extract_version + run: | + VERSION=$(jq -r '.version' < package.json) + echo "VERSION=$VERSION" >> $GITHUB_ENV + env: + VERSION: ${{ steps.extract_version.outputs.VERSION }} \ No newline at end of file From 8fe0441d7bd54e91791ebbe1025f00abbeaf1d7d Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:02:46 +0200 Subject: [PATCH 2/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/quality-check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index 84c8a3b1..51f55910 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -21,11 +21,11 @@ jobs: - name: Check quality run: | bun i - bash .github/workflows/scripts/quality.sh +# bash .github/workflows/scripts/quality.sh - name: Extract version from package.json id: extract_version run: | - VERSION=$(jq -r '.version' < package.json) + VERSION=$(jq -r '.version' < dist/ngx-mask-lib/package.json) echo "VERSION=$VERSION" >> $GITHUB_ENV env: VERSION: ${{ steps.extract_version.outputs.VERSION }} \ No newline at end of file From c070a41d51b5026010e19fd23859623e35d92f85 Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:04:16 +0200 Subject: [PATCH 3/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/quality-check.yml | 2 +- .github/workflows/scripts/quality.sh | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index 51f55910..a1cb454b 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -21,7 +21,7 @@ jobs: - name: Check quality run: | bun i -# bash .github/workflows/scripts/quality.sh + bash .github/workflows/scripts/quality.sh - name: Extract version from package.json id: extract_version run: | diff --git a/.github/workflows/scripts/quality.sh b/.github/workflows/scripts/quality.sh index 97dea943..da7ced04 100644 --- a/.github/workflows/scripts/quality.sh +++ b/.github/workflows/scripts/quality.sh @@ -7,16 +7,16 @@ bun lint # run snyk:auth -- $snyk_token # bun run snyk:test -output=$(bun run type-coverage) -if echo "$output" | grep -q "lower than "; then - echo "$output" - exit 1 # Terminate the hook script with a non-zero exit code -else - echo "Type coverage is good! 🎉" -fi - -bun run test -bun run cypress:bash +#output=$(bun run type-coverage) +#if echo "$output" | grep -q "lower than "; then +# echo "$output" +# exit 1 # Terminate the hook script with a non-zero exit code +#else +# echo "Type coverage is good! 🎉" +#fi +# +#bun run test +#bun run cypress:bash bun run build From 2baa211cf665fbfd80c2caa84db53ee80ce8af86 Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:08:11 +0200 Subject: [PATCH 4/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/quality-check.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index a1cb454b..b09dfacb 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -28,4 +28,7 @@ jobs: VERSION=$(jq -r '.version' < dist/ngx-mask-lib/package.json) echo "VERSION=$VERSION" >> $GITHUB_ENV env: - VERSION: ${{ steps.extract_version.outputs.VERSION }} \ No newline at end of file + VERSION: ${{ steps.extract_version.outputs.VERSION }} + - name: Confirm extracted version + run: + echo $VERSION" From 75995b414164882269d1d705eb34ed9c028725ab Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:10:47 +0200 Subject: [PATCH 5/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/quality-check.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index b09dfacb..96e87d51 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -27,8 +27,8 @@ jobs: run: | VERSION=$(jq -r '.version' < dist/ngx-mask-lib/package.json) echo "VERSION=$VERSION" >> $GITHUB_ENV - env: - VERSION: ${{ steps.extract_version.outputs.VERSION }} + echo "::set-output name=VERSION::$VERSION" + - name: Confirm extracted version run: - echo $VERSION" + echo "The extracted version is: ${{ steps.extract_version.outputs.VERSION }}" From faaaebc9e406ed5b41d757787acdf11d4e24df5d Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:17:29 +0200 Subject: [PATCH 6/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/quality-check.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index 96e87d51..fea51187 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -22,13 +22,14 @@ jobs: run: | bun i bash .github/workflows/scripts/quality.sh - - name: Extract version from package.json - id: extract_version + - name: Extract version + id: get_version run: | - VERSION=$(jq -r '.version' < dist/ngx-mask-lib/package.json) - echo "VERSION=$VERSION" >> $GITHUB_ENV - echo "::set-output name=VERSION::$VERSION" + VERSION=$(node -p "require('./dist/ngx-mask-lib/package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Confirm extracted version + - name: Use version + env: + VERSION: ${{ steps.get_version.outputs.version }} run: - echo "The extracted version is: ${{ steps.extract_version.outputs.VERSION }}" + echo $VERSION \ No newline at end of file From d7faab368c114d688cfa2c6502d8f040f05b9f73 Mon Sep 17 00:00:00 2001 From: andriikamaldinov1 Date: Fri, 1 Nov 2024 18:23:14 +0200 Subject: [PATCH 7/7] fix(ref: 1440): add version lib version to slack --- .github/workflows/publish.yml | 5 +++++ .github/workflows/quality-check.yml | 13 +------------ .github/workflows/scripts/quality.sh | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cc6bdb35..0add2295 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,6 +30,11 @@ jobs: run: bun publish:lib env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + - name: Extract version + id: get_version + run: | + VERSION=$(node -p "require('./dist/ngx-mask-lib/package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT slack_notification: needs: diff --git a/.github/workflows/quality-check.yml b/.github/workflows/quality-check.yml index fea51187..97b5d7bc 100644 --- a/.github/workflows/quality-check.yml +++ b/.github/workflows/quality-check.yml @@ -21,15 +21,4 @@ jobs: - name: Check quality run: | bun i - bash .github/workflows/scripts/quality.sh - - name: Extract version - id: get_version - run: | - VERSION=$(node -p "require('./dist/ngx-mask-lib/package.json').version") - echo "version=$VERSION" >> $GITHUB_OUTPUT - - - name: Use version - env: - VERSION: ${{ steps.get_version.outputs.version }} - run: - echo $VERSION \ No newline at end of file + bash .github/workflows/scripts/quality.sh \ No newline at end of file diff --git a/.github/workflows/scripts/quality.sh b/.github/workflows/scripts/quality.sh index da7ced04..97dea943 100644 --- a/.github/workflows/scripts/quality.sh +++ b/.github/workflows/scripts/quality.sh @@ -7,16 +7,16 @@ bun lint # run snyk:auth -- $snyk_token # bun run snyk:test -#output=$(bun run type-coverage) -#if echo "$output" | grep -q "lower than "; then -# echo "$output" -# exit 1 # Terminate the hook script with a non-zero exit code -#else -# echo "Type coverage is good! 🎉" -#fi -# -#bun run test -#bun run cypress:bash +output=$(bun run type-coverage) +if echo "$output" | grep -q "lower than "; then + echo "$output" + exit 1 # Terminate the hook script with a non-zero exit code +else + echo "Type coverage is good! 🎉" +fi + +bun run test +bun run cypress:bash bun run build