Monday, July 23, 2018

#1 2014-02-08 08:35:18 am

Registered: 2010-09-03
Posts: 101

ASMake: an AppleScript build library

I'm pleased to announce the first release of ASMake, a rare case of an AppleScript script library that is used from the command-line! smile If you know Ruby's rake or GNU make, well, ASMake tries to be their little brother. But, since it's written in pure AppleScript, it may be a better choice to manage AppleScript projects than rake or make (although you can use it for any kind of project, not just AppleScript). Note that ASMake is still in its infancy: while quite a lot of functionality is already there, it has a long way to go. Suggestions and contributions are welcome!

The documentation is available in the README and (at this stage) in the source code, so I won't repeat it here. The idea is that you have a project and want to automate some tasks, like building, deploying, cleaning files, running tests, or whatever. To do so, you may put a makefile.applescript file in your project's directory. Such file will contain the definitions of the various tasks. For example, a task to compile all the scripts in your AppleScript project might look like this:


script build
property parent : Task(me)
property description : "Build all AppleScript scripts in this project."
osacompile("*.applescript", "scpt", {"-x"})

You may run this task from the command line with

asmake build

That's all. ASMake also provides support for command-line arguments and parametrised tasks (see the README). Since tasks are just scripts, the full power of AppleScript is at your disposal, of course. Besides, ASMake defines some helper handlers, like the osacompile() handler shown above, and more will be added in the future.

The script is available from Stable releases can be downloaded here:

[Edit] Fix URLs

Last edited by druido (2014-02-08 08:38:35 am)

Filed under: asmake



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)