-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
How to update README.org and check if building of jar and cljs works? #52
Comments
It is possible to do what you're saying and it would be pretty cool, but it is a bit of work. I'm getting us started with some snippets. Given this code: https://gist.github.com/munen/4cb3b5493f48e7f032d72b5c3440346a You can run it like so: munen@lambda:~/tmp% emacs -l init.el --batch tangle_test.org -f org-babel-execute-src-block
executing Ruby code block...
Code block evaluation complete. Unfortunately, we're not done, yet. Firstly, the I've searched the Interwebs for a finished solution and interestingly couldn't find one so far. The best thing I've found is https://emacs.stackexchange.com/a/28655/17889 which provides a shell script which needs an Org file and a named source block as input. From a first look it looks a bit complicated, though. Maybe that's required. Starting from my too simple and the probably too complicated script, we could build something that doesn't need a specific named source block, but just walks through the file and executes all source blocks. That could be a sweet little snippet that can be re-used in different places. |
Another idea is to use the easier to use tangle feature of org mode. It's described here, again at EmacsConf2020 ;) It's not meant to update the README itself but generate source files from babel source blocks which can be executed as tests. It would be useful for testing the compilation and also the use of the library in a sample clojure script. |
I created a Makefile and made use of tangling Now, the build and more tests can be executed with:
|
After changes and before pushing to GitHub, we usually want to:
lein cljsbuild once main
)lein uberjar
)The README.org already have build instructions and code for samples embedded in babel blocks.
Can we call emacs with org-mode babel to run all source blocks and fail if a shell source block has non-zero exit status?
We could have a Makefile with
update-readme: emacs --batch … README.org
Alternatively we could add build rules in the Makefile but that would actually be redundant to the README.org.
What do you think?
The text was updated successfully, but these errors were encountered: