Skip to content

Commit

Permalink
Merge pull request #8 from StudyTube/fix-no-changes-case
Browse files Browse the repository at this point in the history
fix if test or apps have no changes
  • Loading branch information
bolelamx authored Oct 25, 2021
2 parents 5de5c2e + 5d65520 commit eae8172
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.angulardoc.json

# IDE - VSCode
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

# System Files
.DS_Store
Thumbs.db
8 changes: 6 additions & 2 deletions hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ if [ -n "$tsfiles" ]; then

echo "==> Staging formatted .ts, .html files"
echo "$filestoprettify" | xargs git add
fi;

if [ -n "$appScriptsToLint" ]; then
echo "==> Checking TSLint errors in app's staged files";
echo "$appScriptsToLint" | xargs node_modules/tslint/bin/tslint --project tsconfig.json
printf "${GREEN}🔨️ App's scripts and templates are fine!${NC}\n\n"
fi;

if [ -n "$e2eScriptsToLint" ]; then
echo "==> Checking TSLint errors in e2e staged files";
echo "$e2eScriptsToLint" | xargs node_modules/tslint/bin/tslint --project ./e2e/tsconfig.json
printf "${GREEN}🔨️ E2e scripts are fine!${NC}\n\n"
echo "$e2eScriptsToLint" | xargs node_modules/tslint/bin/tslint --project ./e2e/tsconfig.json
printf "${GREEN}🔨️ E2e scripts are fine!${NC}\n\n"
fi;

if [ -f "$STYLELINT_CONFIG" ] && [ -n "$stylesToLint" ]; then
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-git-hooks",
"version": "1.0.8",
"version": "1.0.9",
"description": "Storage for git hooks used in Studytube's Angular apps.",
"author": "",
"license": "ISC"
Expand Down

0 comments on commit eae8172

Please sign in to comment.