Fix Makefile "test-package-files" task
See original GitHub issueWe made a well-intentioned change to our Makefile that tests to see if each exercise has a package.json
file that matches the global xecmascript/package.json
file, and fails the build if not.
However, there is no easy way for a contributor to update all the package.json
files when there is a change. It is critical that these files are all updated, and we want this to happen before PRs are submitted, so the build fails if it is not done.
Two possible solutions:
- Have the Makefile check its environment. If
Travis=true
then we’re in CI and should always SKIP copying thepackage.json
files from global to each exercise. - Add a task to the Makefile that would let contributors copy the package.json file to all exercises, EG
make copy-package-to-exercises
.
Either approach probably warrants a small update to the contributor docs.
Success Criteria:
- Builds fail on Travis if
package.json
files are not the same in each exercise as the global. - Contributors have a simple way to make sure their PRs are ready for CI testing.
- Documentation is updated.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Fix Makefile "test-package-files" task · Issue #303 - GitHub
Two possible solutions: Have the Makefile check its environment. If Travis=true then we're in CI and should always SKIP copying the package.json ...
Read more >How do you force a makefile to rebuild a target? - Stack Overflow
The correct answer, is, not to declare your targets to be phony, but rather, declare an additional phony target, and then, depend the...
Read more >Makefile Tutorial By Example
The commands are a series of steps typically used to make the target(s). These need to start with a tab character, not spaces....
Read more >How to Fix Error Makefile: *** missing separator. Stop - YouTube
How to fix make error: Makefile : *** missing separator. Stop. How to replace spaces with tabulation in Visual Studio Code (vscode).
Read more >Makefiles, but in English - YouTube
Makefiles, but in English. 17K views 2 years ago. 801Labs. 801Labs. 323 subscribers. Subscribe. 357. I like this. I dislike this.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I prefer taking the second way, adding the new
copy-package-to-exercises
task.I’m wondering if we need a new task to be able to build the project, to run tests independently of copying
package.json
or checking them.Let’s say we have these tasks:
make test
: it should just run tests, nopackage.json
checking, nopackage.json
copyingmake copy-package-to-exercises
: easy to understandmake build
: it could checkpackage.json
equality and run tests.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.