Commit Graph

98 Commits

Author SHA1 Message Date
Allan Odgaard
75dc734a87 When tar fails, it does not remove the output file 2014-04-06 19:36:08 +07:00
Boris Dušek
c3088da9a5 Add my work email as contributor address 2014-04-01 14:03:29 +07:00
Allan Odgaard
3bc0c65c7a Introduce variable for where cap’n’proto is installed
Set the `capnp_prefix` variable when calling ./configure.

E.g. build and install cap’n’proto in $HOME/build:

    ./configure --disable-shared --prefix="$HOME/build"
    make -j6 check && make install

Then configure TextMate to find it there:

    capnp_prefix="$HOME/build" ./configure
2014-03-30 11:18:41 +07:00
Allan Odgaard
3aa383a166 GitHub releases API is no longer in preview 2014-02-14 13:35:54 +07:00
Allan Odgaard
d52eda852e Disable timestamp server for code signing
This slows down signing enormously (10+ seconds) and fails most of the time when internet connectivity is suboptimal (might be related to being behind a proxy).
2014-02-10 13:51:04 +07:00
Allan Odgaard
8ff36f3402 Revert "Use custom script to simulate “codesign --deep”"
This reverts commit 434917b1e9.
2014-02-10 13:48:58 +07:00
Allan Odgaard
885325e992 Use netrc for GitHub credentials
This changes the authentication mechanism from passing an authorization token / API key to using basic auth. Basic auth didn’t work when I initially tested the upload API, but hopefully GitHub has since added it (I did request it, but didn’t get a reply, so no idea if the omission was an oversight or by design).
2013-12-13 18:39:24 +07:00
Allan Odgaard
1293828e79 Upload to existing release if it already exists
Creating a release with attachment is non-atomic in that the release is first created and then we upload to that release but our build file has it as a single action, so this action should be able to handle partial success from a previous execution.
2013-12-12 14:11:26 +07:00
Allan Odgaard
72adfe9115 Change ruby syntax: [ foo ].shelljoin → foo.shellescape 2013-12-05 12:14:13 +07:00
Allan Odgaard
f880f3df63 Add credits email hash for rdwampler 2013-12-01 14:59:09 +07:00
Allan Odgaard
9a017f97ff Use GitHub’s (preliminary) API for uploading releases 2013-12-01 14:56:48 +07:00
Allan Odgaard
bc7cbffb0c Add -t/--tag option to bin/upload
Presently unused but mandatory.
2013-12-01 14:49:25 +07:00
Allan Odgaard
d2935f976b Add upload (ninja) target 2013-12-01 14:48:27 +07:00
Allan Odgaard
f80794e3b0 Update shebang to explicitly call ruby 1.8 2013-12-01 14:46:43 +07:00
Allan Odgaard
434917b1e9 Use custom script to simulate “codesign --deep”
The problem is that with a bad internet connection there is a very high probability that “codesign --deep” will fail due to having to contact the timestamp server for each embedded executable object.

Long-term we probably want to sign the sub-targets as they are produced and/or link the entire thing together so that there is only a single sign target (plus embedded plug-ins).
2013-12-01 14:35:09 +07:00
Allan Odgaard
f88c028d97 Only show one warning per missing user when generating credits 2013-11-03 20:37:47 +01:00
Allan Odgaard
78b110dc0e Use /usr/bin/tar instead of gnutar (which is removed on 10.9)
We were using gnutar to avoid the extended header keywords that bsdtar add to the archive (for non-ASCII file names) as those will cause older versions of gnutar (like the one included with 10.8 and earlier) to give warnings/errors when extracting the archive.

Issue #1180
2013-11-03 20:37:47 +01:00
Allan Odgaard
a9a1c38006 Sign embedded bundles
This is required when signing on OS X 10.9.

Although the option is not documented for the version of codesign included with 10.8, using it does not result in an error.

Closes #1158
2013-10-27 11:37:27 +01:00
Allan Odgaard
c5ecf8f6c6 Handle *.c++ files in gen_build
We already handle these when mapping extension to file type.
2013-08-24 01:19:29 +02:00
Allan Odgaard
8a2ad5ed20 Add support for capnp files (build system) 2013-08-16 22:40:09 +02:00
Allan Odgaard
09511a9092 Introduce single function for mapping extension to language 2013-08-16 22:40:09 +02:00
Allan Odgaard
2c55141e47 Support setup functions for tests
Previously this had to be done via global constructor functions but it would seem the execution of these may happen before initialization of global data.
2013-08-16 22:40:08 +02:00
Allan Odgaard
84dc2dd871 Allow a target to use both new and old test system
Presently the new test system cannot be used for (interactive) GUI tests, so we keep the old one until we have that feature in the new.
2013-08-01 19:01:24 +02:00
Allan Odgaard
f0bd118738 Update build (generator) script
Use APP_VERSION instead of APP_REVISION in various target names.

Indicate a few build commands are generators, so that their output is not removed on ‘ninja -t clean’.

Move generated dummy files (for tagging, uploading, deploying, etc.) to sub-directories to reduce noise in build directory.
2013-08-01 11:36:27 +02:00
Allan Odgaard
cdbadad8bd Add script used to update Changes.md 2013-07-31 21:16:47 +02:00
Allan Odgaard
2f4370dc9b Implement ‘-=’ for target files
Presently only for “string keys” like compiler and linker flags.
2013-07-30 23:11:48 +02:00
Jacob Bandes-Storch
847bef3bdd Use @rpath so frameworks can be loaded from the app bundle
@executable_path is the originally-executed program, whereas @loader_path is the program that caused the load to occur (e.g. a Quick Look generator). @rpath can be changed at link time — a QL generator can specify a value that points to the enclosing app bundle’s Frameworks directory.
2013-07-30 22:16:17 +02:00
Jacob Bandes-Storch
5a7bd6c914 Add usernames for missing GitHub email addresses 2013-07-28 21:57:51 +02:00
Jacob Bandes-Storch
80327f7bb7 Modify gen_build to accept keys for copying into nested directories 2013-07-27 19:21:07 -07:00
Allan Odgaard
6f264a2520 Fix issue with reference types used in assertions 2013-07-26 13:53:57 +02:00
Allan Odgaard
a42e93f8b8 Ensure -include «pch» is the first compiler option
This is incase we want to set ‘-include’ via a FLAGS variable, as that only works when it is listed after a potential precompiled header include.
2013-07-21 13:25:29 +02:00
Allan Odgaard
03d72414f3 Specify that dependency files are ‘gcc’ (for ninja 1.3.0) 2013-05-17 15:31:14 +07:00
Allan Odgaard
6e4b305587 fixup! Cleanup a failed GitHub upload 2013-05-02 16:13:33 +07:00
Allan Odgaard
610624ca5a Improve variable handling when rebuilding build.ninja
Variables which are not referencing other variables are no longer provided with their literal value. Variables which do reference other variables have the reference escaped, so that ninja won’t expand the reference when rebuilding build.ninja.

There is still some redundancy in that APP_VERSION has the major + tag part stated both at the top and as a command line argument, haven’t yet figured out how to best deal with this.
2013-04-11 10:24:47 +07:00
Allan Odgaard
be83c7d91d Cleanup a failed GitHub upload
This might be moot given that the API should have been disabled by now.
2013-04-10 21:47:35 +07:00
Allan Odgaard
c54360fce3 Don’t expand APP_* variables in build.ninja
This makes it simpler to edit the generated file as one only need to edit the top variable section.
2013-04-01 13:22:41 +07:00
Allan Odgaard
f4f0e073d3 Use ‘alpha’ prefix instead of ‘r’ 2013-03-17 17:08:54 +01:00
Allan Odgaard
ca91ce58c6 Add options to generated test executable
The current options are:

 -b/--benchmark   Run benchmarks instead of tests.
 -m/--measure     Measure time of each test. This disables concurrency.
 -r/--repeat <n>  Number of times to repeat each test/benchmark.
 -v/--verbose     Be verbose.
 -h/--help        Show this help.
 -V/--version     Show version number.
2013-03-10 14:34:44 +01:00
Allan Odgaard
99969996c5 Ensure test assertions are only evaluated once 2013-03-10 14:34:43 +01:00
Allan Odgaard
687d0ee9e4 Ensure we use /usr/bin/mktemp
It appears some variants of mktemp require the template parameter to contain a minimum number of X’es.
2013-03-01 16:30:10 +01:00
Allan Odgaard
1f4eecbab7 Always use system default ruby 1.8
Maybe fixes #845.
2013-02-27 13:42:23 +01:00
Allan Odgaard
ccf63ae206 Use proper PCH for tests
We previously passed an array to ‘pch_for’ where we should have passed a source path, though it appear to have worked.
2013-02-25 15:28:37 +01:00
Allan Odgaard
2f3cd66a2b Support relative includes in tests
Since we inline the test file, rather than include it, relative includes from this inlined code would not work.
2013-02-23 09:19:45 +01:00
Allan Odgaard
9ebcfcbd79 Support to_s for most integer types
Here “most” refers to signed and unsigned 16, 32, and 64 bit integers.
2013-02-22 15:53:05 +01:00
Allan Odgaard
01417054cb Add test system supporting grand central dispatch
The motivation for introducing a new test generator is that CxxTest cannot be used with tests that (indirectly) schedule code to run in the main queue.

There are a few other advantages of breaking with CxxTest:

 1. Less boilerplate: A test file need only contain a
    function named with a ‘test_’ prefix. No classes,
    inheritance, or similar. If you need fixtures, use the
    multitude of ways that C/C++ allows that (constructor
    functions or non-POD types with static storage).

 2. Concurrent tests: Test functions are scheduled with
    ‘dispatch_apply’ and will thus run concurrently. If
    you need serial execution you can wrap your tests in a
    block and schedule that to run in the main queue.
    Though you should catch exceptions and re-throw these
    in the test’s original queue, as the test assertions
    are using exceptions.

 3. Easier output of custom types: The assertion macros
    will call ‘to_s’ on the arguments given, so the only
    thing required to make these output nicely is to
    provide a ‘to_s’ overload for your custom type /
    enumeration. I know that the standard way to do this
    is overloading operator<< for a stream, but the
    TextMate code-base already uses the ‘to_s’
    convention.

Long-term I can see a few other advantages, like calling preprocessor on the input files to support #if/#else/#endif to disable tests, better support for Cocoa code (NSRunLoop), and introducing test timeouts.
2013-02-21 15:54:37 +01:00
Allan Odgaard
a1b9c305da Move version knowledge outside upload script 2013-02-18 16:11:12 +01:00
Allan Odgaard
66350b6492 Remove ‘after_bump’ phony rule
Turns out a phony rule in ninja isn’t exactly the same as an alias. When the file the phony rule is supposed to be an alias of already exist when calling ‘ninja’ then rules depending on the alias are not considered out-of-date even if the aliased file is of newer date.

Build rules that previously depended on ‘after_bump’ should instead depend on ‘builddir/revision.$APP_REVISION’.
2013-02-16 10:43:55 +01:00
Allan Odgaard
6cd7d86215 Script to create default bundles would always exit successfully
We shouldn’t do anything after the essential line of the script, as we want that line’s status code to be the script’s exit status.
2013-02-11 14:21:19 +01:00
Allan Odgaard
b2ae4196c3 Update database of contributor email hashes 2013-02-05 15:05:26 +01:00
Allan Odgaard
2df0f7aa51 Revert "Do not timestamp our code signing"
Some users have reported issues opening TextMate: Finder tells them the program is corrupt and should be moved to trash. If the user adds his own (ah hoc) signature, then no such dialog is shown.

This reverts commit 1c164e3ce0.
2013-01-29 15:31:10 +01:00