Skip to content

Commit

Permalink
feat(no-ref): remove husky and version in build
Browse files Browse the repository at this point in the history
* fix(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* feat(ref: no-ref): remove husky

* fix(ref: no-ref): remove husky

* fix(ref: no-ref): remove husky

* fix(ref: no-ref): remove husky

* fix(ref: no-ref): remove husky

* fix(no-ref): remove husky and right pre-commit

* fix(no-ref): remove husky and right pre-commit v1

* fix(no-ref): add version for build

* fix(no-ref): add version for build v1

---------

Co-authored-by: Igor Nepipenko <[email protected]>
  • Loading branch information
andriikamaldinov1 and igorn-mwp authored Mar 18, 2024
1 parent b5d8925 commit 854f97a
Show file tree
Hide file tree
Showing 12 changed files with 779 additions and 51 deletions.
17 changes: 17 additions & 0 deletions .github/.hooks/pre-commit/quality
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin

set -e

npm run lint

output=$(npm 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

npm run test

npm run build
14 changes: 14 additions & 0 deletions .github/scripts/replace_template.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Check if the correct number of arguments are provided
if [ $# -ne 1 ]; then
echo "Usage: $0 <version>"
exit 1
fi

# Assign arguments to variables
custom_string="$1"

# Perform the replacement and save to output file
sed -i "" "s/<%version%>/$custom_string/g" "angular.json"
echo "Template string replaced successfully. 🎉"
1 change: 1 addition & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
echo '********'
echo "RELEASE_VERSION: $RELEASE_VERSION"
echo '********'
bash .github/scripts/replace_template.sh $RELEASE_VERSION
npm run build
- name: Deploy demo
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@ jobs:
run: |
npm ci --force
git submodule update --init --recursive --remote
npm run lint
npm run cypress:bash
npm test
npm run build
npm run build:lib
bash .github/workflows/scripts/quality
9 changes: 9 additions & 0 deletions .github/workflows/scripts/quality
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin

set -e

npm run lint
npm run cypress:bash
npm test
npm run build
npm run build:lib
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

5 changes: 0 additions & 5 deletions .husky/pre-commit

This file was deleted.

9 changes: 7 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
},
"configurations": {
"production": {
"define": {
"VERSION": "'<%version%>'"
},
"budgets": [
{
"type": "initial",
Expand All @@ -55,13 +58,15 @@
"outputHashing": "all"
},
"development": {
"define": {
"VERSION": "'v0.0.1'"
},
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"

},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
Expand Down Expand Up @@ -157,4 +162,4 @@
},
"analytics": "682218d2-280d-47b1-b385-b2c8c903f9a9"
}
}
}
Loading

0 comments on commit 854f97a

Please sign in to comment.