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

Added Windows compatibility to build and test scripts #6

Merged
merged 1 commit into from
Apr 16, 2017

Conversation

ronniegane
Copy link
Contributor

@ronniegane ronniegane commented Apr 16, 2017

fixes #1 - allows sbt run and sbt test to work out-of-the-box on windows OS (tested on Windows 10 x64) and Mac (tested on OSX El Capitan 10.11.6).

Still outstanding issues:

  • You get an error about the postinstall chmod +x normalize_file_names.sh command, because chmod doesn't exist on Windows. Not sure what to do about that, since you can't put OS-checking logic in package.json, could possibly have the postinstall script call some javascript with node that carries out OS-specific commands. This has no effect on the web app running successfully though.
  • sbt test fails initially with error code 135: Could not find update-config.json. Run 'webdriver-manager update' to download binaries. This might be related to this angular-cli issue. In any case, this is fixed by running npm run pree2e in the /ui folder. Maybe we could add that to the normal sbt test hook.

@ronniegane ronniegane mentioned this pull request Apr 16, 2017
@lbialy
Copy link
Owner

lbialy commented Apr 16, 2017

a) that normalize_file_names.sh script wasn't a very bright move on my side. It's quite obvious that same thing can be achieved using a node.js script, which is guaranteed to succeed thanks to node being available.
b) yes, that's precisely result of that issue as I replaced npm task calls with ng task calls in last update. I think that webdriver should be updated during postinstall hook so that it doesn't get called every time one runs sbt test - it's relatively expensive, as it's doing a network call AFAIR.

Thanks for PR, I'll review it in few minutes 👍

@lbialy
Copy link
Owner

lbialy commented Apr 16, 2017

One more thing about a) - that's a problem only because angular-cli people insist on generating compilation hashes in file names for prod files and no option to disable that. I'll check if they added this option. Another way would be to make Play resolve and serve files with compilation hash somehow.

Copy link
Owner

@lbialy lbialy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General implementation is ok.

@lbialy lbialy merged commit 5837685 into lbialy:master Apr 16, 2017
@ronniegane ronniegane deleted the ronniegane/windows-compatibility branch April 16, 2017 12:51
@ronniegane
Copy link
Contributor Author

@lbialy with the webdriver update issue, for my own project that I'm building from this seed I added && ./node_modules/protractor/bin/webdriver-manager update to the postinstall script in package.json and that seemed to work. On OSX at least, I haven't tested it on Windows yet. Lets you run sbt test on a brand new project without having to manually update webdriver. Got the idea from this stackoverflow thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running on Windows 10?
2 participants