Skip to content

Commit

Permalink
Merge pull request #65 from BrianDGLS/issue/57-add-file-stub-to-exerc…
Browse files Browse the repository at this point in the history
…ises

57: add file stub to exercises
  • Loading branch information
masters3d authored Sep 22, 2017
2 parents bbe754d + ff4dcfd commit fa0cd27
Show file tree
Hide file tree
Showing 22 changed files with 15 additions and 4 deletions.
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.

0 comments on commit fa0cd27

Please sign in to comment.