Example #1
0
                     no target is specified.
  test             - Runs the testsuite and displays the results.
  check            - Runs the lint-target, builds some OpenLayers files, and
                     then runs test. Many developers call this target often
                     while working on the code.
  help             - Shows this help.

Other less frequently used targets are:
  apidoc           - Builds the API-Documentation using JSDoc3.
  integration-test - Builds all examples in various modes and usually takes a
                     long time to finish. This target calls the following
                     targets: lint, build, build-all, test, build-examples,
                     check-examples and apidoc.
  reallyclean      - Remove untracked files from the repository.
  checkdeps        - Checks whether all required development software is
                     installed on your machine.
  fixme            - Will print a list of parts of the code that are marked
                     with either TODO or FIXME.
  todo             - is an alias for the fixme-target
  plovr            - Fetches the required plovr.jar. Usually called by other
                     targets that depend on plovr.

If no target is given, the build-target will be executed.

The above list is not complete, please see the source code for not-mentioned
and only seldomly called targets.
    '''

if __name__ == '__main__':
    main()
Example #2
0
        num_matches = len(matches[filename])
        noun = 'matches' if num_matches > 1 else 'match'
        print '  %s has %d %s:' % (filename, num_matches, noun)
        for match in matches[filename]:
            print '    %s' % (match, )
        print
    print 'A total of %d TODO/FIXME(s) were found' % (totalcount, )


@target('reallyclean')
def reallyclean(t):
    """Removes untracked files and folders from previous builds."""
    # -X => only clean up files that are usually ignored e.g.
    #       through .gitignore
    # -d => also consider directories for deletion
    # -f => if git configuration variable clean.requireForce != false,
    #       git clean will refuse to run unless given -f or -n.
    t.run('%(GIT)s', 'clean', '-X', '-d', '-f', '.')


@target('checkdeps')
def check_dependencies(t):
    for exe in EXECUTABLES:
        status = 'present' if which(exe) else 'MISSING'
        print 'Program "%s" seems to be %s.' % (exe, status)
    print 'For certain targets all above programs need to be present.'


if __name__ == '__main__':
    main()
Example #3
0
File: build.py Project: geops/ol3

@pake.target("hostexamples", "build", "examples", phony=True)
def hostexamples(t):
    t.makedirs("build/gh-pages/%(BRANCH)s/examples")
    t.makedirs("build/gh-pages/%(BRANCH)s/build")
    t.cp(
        EXAMPLES,
        (path.replace(".html", ".js") for path in EXAMPLES),
        "examples/style.css",
        "build/gh-pages/%(BRANCH)s/examples/",
    )
    t.cp("build/loader_hosted_examples.js", "build/gh-pages/%(BRANCH)s/examples/loader.js")
    t.cp("build/ol.js", "build/ol.css", "build/gh-pages/%(BRANCH)s/build/")
    t.cp("examples/example-list.html", "build/gh-pages/%(BRANCH)s/examples/index.html")
    t.cp(
        "examples/example-list.js",
        "examples/example-list.xml",
        "examples/Jugl.js",
        "build/gh-pages/%(BRANCH)s/examples/",
    )


@pake.target("test", INTERNAL_SRC, phony=True)
def test(t):
    t.run("%(PHANTOMJS)s", "test/phantom-jasmine/run_jasmine_test.coffee", "test/ol.html")


if __name__ == "__main__":
    pake.main()