Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

57: add file stub to exercises #65

Merged
merged 2 commits into from Sep 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ test-assignment:

test:
$(MAKE) checkAllPackageFilesAreTheSame
$(MAKE) checkAllExercisesHaveStubFile
@npm install tslint typescript -g
@tslint './**/*.ts?(x)' -c "./common/tslint.json" --format "json" >> lintreport.json ; exit 0
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) test-assignment || exit 1; done


all: moveAllIntoCommonDir
all: moveCommonIntoSubDir
Expand All @@ -44,7 +45,7 @@ moveAllIntoCommonDir:

moveCommonIntoSubDir:
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) moveAssigmentToSub || exit 1; done

all: replacePackageFilesFromCommonToSubFolders

copyPackageFilesToSubFolder:
Expand All @@ -67,9 +68,19 @@ checkPackageFilesMach:
reportError:
@echo "**Package files in |$(ASSIGNMENT)| are not equal to the |common| folder**" ;
@exit 1

checkAllPackageFilesAreTheSame:
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) checkPackageFilesMach || ASSIGNMENT=$$assignment $(MAKE) reportError || exit 1 ;done
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) checkPackageFilesMach || ASSIGNMENT=$$assignment $(MAKE) reportError || exit 1 ;done
@echo "==All package support files look to be the same as the ones in common=="

reportNoStubFile:
@echo "**Exercise |$(ASSIGNMENT)| does contain a stub file**" ;
@exit 1

checkStubFileExists:
[ -f ./exercises/$(ASSIGNMENT)/$(ASSIGNMENT).ts ] || exit 1;

checkAllExercisesHaveStubFile:
@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) checkStubFileExists || ASSIGNMENT=$$assignment $(MAKE) reportNoStubFile || exit 1 ;done
@echo "==All exercises should contain a stub file with the exercise name=="

Empty file added exercises/anagram/anagram.ts
Empty file.
Empty file.
Empty file added exercises/bob/bob.ts
Empty file.
Empty file.
Empty file added exercises/etl/etl.ts
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added exercises/hamming/hamming.ts
Empty file.
Empty file.
Empty file added exercises/leap/leap.ts
Empty file.
Empty file added exercises/pangram/pangram.ts
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added exercises/say/say.ts
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added exercises/wordy/wordy.ts
Empty file.