List of commits:
Subject Hash Author Date (UTC)
remove plank 72b9357832df405e498da540a30b1a19e245906b mbusenitz 2015-07-21 10:41:38
fix build 9550d26ccb8f60c9257bb928aeca58ed1d15a29f mbusenitz 2015-02-28 23:51:26
master rework batch 6f96134102be0e5a3dc2d9745640b98edc5d4e4d mbusenitz 2015-02-28 23:09:16
fix traverse destructive 2c3839ec7a709d3412e7f5b3e5acc3ed5d900e97 mbusenitz 2015-02-28 18:25:42
master rework bfd068cc2513e275bfe31ca4a4075b64858d98b2 mbusenitz 2015-02-28 13:15:49
cleanup 243f014fbc1cf0e0b88dadc69daec250406e219c mbusenitz 2015-02-28 11:53:29
cleanup 849260db25b72640b9b8cb35c3170e4ef14fe9bb mbusenitz 2015-02-28 11:44:40
master rework process interface" 6bd50518b575f162486d7252bd1f29d628325f26 mbusenitz 2015-02-28 11:43:46
test args 523b7174ede20ae385ccc131738a32d6de3a412e mbusenitz 2015-02-27 05:31:55
check_traverse_while_traverse 13fd698a0986a46dbde2f886435cf0313679640f mbusenitz 2015-02-27 05:17:49
fix test 0d8478c8650285983253d655b5254701a6d9302b mbusenitz 2015-02-26 21:03:12
batch test e6f780a6e37191ea0ed22fe35fff421a770860bc mbusenitz 2015-02-26 20:39:03
Squashed 'test/plank/' changes from 09a9867..3962f58 f2f24b430e4b39687cbbc6f0ffcce4d5e08f96de mbusenitz 2015-02-26 20:36:05
master rough pass 8e41bfcd72b69abe79d69e73a1d13f1e2e9b1e39 mbusenitz 2015-02-26 19:42:41
master rename 0822dbbdba16f539d088d3b60320da32f688ebce mbusenitz 2015-02-26 06:11:15
master first pass a15417f304e070121e34272eaedf1e51fce5f1fd mbusenitz 2015-02-26 06:00:11
Squashed 'test/plank/' content from commit 09a9867 486e835d9a925e450abfb6dfce9437e808b5cf0f mbusenitz 2015-02-26 05:29:41
init 4d1b6b27cb5dc364239073fa755a549b817031b9 mbusenitz 2015-02-26 05:29:35
Commit 72b9357832df405e498da540a30b1a19e245906b - remove plank
Author: mbusenitz
Author date (UTC): 2015-07-21 10:41
Committer name: mbusenitz
Committer date (UTC): 2015-07-21 10:41
Parent(s): 9550d26ccb8f60c9257bb928aeca58ed1d15a29f
Signer:
Signing key:
Signing status: N
Tree: 2c54ce8b4d6754f1663e7109fc611d8d12de6939
File Lines added Lines deleted
test/plank/.gitignore 0 4
test/plank/README.md 0 3
test/plank/bin/install.js 0 74
test/plank/bin/reader.js 0 16
test/plank/bin/test.js 0 241
test/plank/bin/update.js 0 24
test/plank/change_log.txt 0 0
test/plank/def/cpp11-gcc.gypi 0 10
test/plank/def/cpp11.gypi 0 6
test/plank/def/mac-targets.gypi 0 32
test/plank/example/.gitignore 0 2
test/plank/example/def/main.gypi 0 6
test/plank/example/test/def/test.gyp 0 15
test/plank/example/test/def/test2.gyp 0 15
test/plank/example/test/src/main.cpp 0 12
test/plank/example/test/src/other.cpp 0 12
test/plank/m_.json 0 5
test/plank/package.json 0 24
test/plank/src/test.h 0 23
test/test.gyp 1 1
File test/plank/.gitignore deleted (index 47a5201..0000000)
1 build/
2 *.xcodeproj/
3 node_modules/
4 .DS_Store
File test/plank/README.md deleted (index 6e35e97..0000000)
1 plank
2 =====
3 https://github.com/mucbuc/plank/wiki/quick-guide
File test/plank/bin/install.js deleted (index 2faf7e6..0000000)
1 #!/usr/bin/env node
2
3 var assert = require( 'assert' )
4 , events = require( 'events' )
5 , cp = require( 'child_process' )
6 , emitter = new events.EventEmitter()
7 , Reader = require( './Reader' )
8 , program = require( 'commander' );
9
10 program
11 .version( '0.0.0' )
12 .option( '-p, --prefix [path]', 'output path' )
13 .parse( process.argv )
14
15 emitter.on( 'addSubtree', function( dependency, name ) {
16
17 var child = cp.spawn( 'git', [
18 'subtree',
19 'add',
20 '-P',
21 name,
22 name,
23 'master',
24 '--squash'
25 ], {
26 stdio: 'inherit'
27 });
28
29 child.on( 'exit', function(code) {
30 emitter.emit( 'next dependency');
31 } );
32
33 });
34
35 installDependencies( Reader.readDependencies() );
36
37 function installDependencies( dependencies, index ) {
38
39 if (typeof index === 'undefined')
40 index = 0;
41
42 if (index < dependencies.length)
43 {
44 var child
45 , dependency = dependencies[ index ]
46 , name = Reader.libName( dependency );
47
48 child = cp.spawn( 'git', [
49 'remote',
50 'add',
51 '-f',
52 name,
53 dependency,
54 ], {
55 stdio: 'inherit'
56 } );
57
58 emitter.once( 'next dependency', function() {
59 installDependencies( dependencies, index + 1 );
60 } );
61
62 child.on( 'exit', function( code ) {
63 if (!code) {
64 console.log( 'remote added: ', name );
65 emitter.emit( 'addSubtree', dependency, name );
66 }
67 else {
68 console.log( 'remote add failed: ', name );
69 emitter.emit( 'next dependency');
70 }
71 });
72 }
73 }
74
File test/plank/bin/reader.js deleted (index fcc46d1..0000000)
1 var assert = require( 'assert' )
2 , path = require( 'path' )
3 , m_ = require( '../m_.json' );
4
5 assert( m_.hasOwnProperty( 'dependencies' ) );
6
7 function readDependencies() {
8 return m_.dependencies;
9 }
10
11 function libName( dependency ) {
12 return 'lib/' + path.basename( dependency, '.git' );
13 }
14
15 module.exports.readDependencies = readDependencies;
16 module.exports.libName = libName;
File test/plank/bin/test.js deleted (index c2a8115..0000000)
1 #!/usr/bin/env node
2
3 var assert = require( 'assert' )
4 , cp = require( 'child_process' )
5 , events = require( 'events' )
6 , path = require( 'path' )
7 , fs = require( 'graceful-fs' )
8 , emitter = new events.EventEmitter
9 , util = require( 'util' )
10 , ansi = require( 'ansi' )
11 , cursor = ansi( process.stdout )
12 , program = require( 'commander' )
13 , copy = require( 'fs-extra' ).copy;
14
15 assert( typeof cp !== 'undefined' );
16 assert( typeof copy === 'function' );
17
18 program
19 .version( '0.0.0' )
20 .option( '-g, --gcc', 'use gcc compiler' )
21 .parse( process.argv );
22
23 program.path = path.join( __dirname, '../..' );
24 program.output = path.join( __dirname, '../..', 'build' );
25
26 attachLogic( emitter );
27
28 console.log( program.output );
29
30 emitter.emit( 'traverse', program.path );
31
32 function attachLogic(emitter) {
33
34 emitter.on( 'run', function( defFile, testDir, targetName ) {
35 begin( defFile, 'run' );
36 run( defFile, testDir, targetName, function(exitCode) {
37 if (!exitCode) {
38 finishGreen( defFile );
39 console.log( '=> ' + targetName + ' passed' );
40 }
41 else {
42 finishRed( defFile ) ;
43 console.log( '=> ' + targetName + ' failed with exit code:', exitCode );
44 }
45 });
46 });
47
48 emitter.on( 'build', function( defFile, testDir ) {
49 begin( defFile, 'build' );
50 build( defFile, testDir, function( exitCode, targetName, buildDir ) {
51 if (!exitCode) {
52 finishGreen( defFile );
53 emitter.emit( 'run', defFile, buildDir, targetName );
54 }
55 else {
56 finishRed( defFile );
57 }
58 });
59 });
60
61 emitter.on( 'generate', function( defFile, testDir ) {
62 begin( defFile, 'generate' );
63 generate( defFile, testDir, function( exitCode, buildDir ){
64 finishGreen( defFile, 'generate' );
65 if (!exitCode) {
66 emitter.emit( 'build', defFile, buildDir );
67 }
68 });
69 });
70
71 emitter.on( 'traverse', function(testDir) {
72
73 fs.exists(testDir, function(exists) {
74 if (exists) {
75 traverse( testDir, function(gypFile) {
76 emitter.emit( 'generate', gypFile, testDir );
77 });
78 }
79 else {
80 cursor.red();
81 process.stdout.write( 'invalid test definition path: ');
82 cursor.reset();
83 console.log( testDir );
84 }
85 });
86
87
88 });
89
90 function begin( msg1, msg2 ) {
91 cursor.green();
92 process.stdout.write( msg1 + ': ' );
93 cursor.reset();
94 console.log( msg2 );
95 console.time( msg1 );
96 }
97
98 function finishGreen( msg1 ) {
99 cursor.green();
100 console.timeEnd( msg1 );
101 cursor.reset();
102 }
103
104 function finishRed( msg1 ) {
105 cursor.red();
106 console.timeEnd( msg1 );
107 cursor.reset();
108 }
109
110 function traverse( testDir, cb ) {
111 fs.readdir( testDir, function( err, files ) {
112 files.forEach( function( file ) {
113 if (path.extname(file) == '.gyp') {
114 cb( file );
115 }
116 } );
117 } );
118 }
119
120 function generate( defFile, defDir, cb ) {
121
122 var buildDir = program.output;
123
124 makePathIfNone(buildDir, function() {
125 var include = program.gcc ? 'plank/def/cpp11-gcc.gypi' : 'plank/def/cpp11.gypi';
126 var args = [
127 defFile,
128 '--depth=' + (program.gcc ? './' : '.'),
129 '--generator-output=' + buildDir,
130 '--include=' + include
131 ];
132
133 if (program.gcc) {
134 args.push( '--format=make' );
135 }
136
137 console.log( args );
138
139 cp.spawn(
140 'gyp',
141 args, {
142 stdio: 'inherit',
143 cwd: defDir
144 })
145 .on( 'close', function( code ) {
146 cb( code, buildDir );
147 });
148
149 });
150
151 function makePathIfNone( path, cb ) {
152 fs.exists(path, function(exists) {
153 if (exists)
154 cb();
155 else
156 fs.mkdir( path, [], cb );
157 });
158 }
159 }
160
161 function build( defFile, buildDir, cb ) {
162 readTargetName( defFile, program.path, function( targetName ) {
163
164 console.log( buildDir );
165 var child;
166 if (program.gcc) {
167 child = cp.spawn(
168 'make',
169 [ '-j'],
170 {
171 stdio: 'inherit',
172 cwd: buildDir
173 });
174 }
175 else {
176
177 var args = [
178 "-project",
179 path.join( buildDir, targetName + '.xcodeproj' )
180 ];
181
182 console.log( args, buildDir );
183
184 child = cp.spawn(
185 'xcodebuild',
186 args, {
187 cwd: buildDir,
188 stdio: 'inherit'
189 } );
190 }
191
192 child.on( 'close', function( code ) {
193 cb( code, targetName, buildDir );
194 } );
195 } );
196 }
197
198 function run( defFile, testDir, target, cb ) {
199
200 var execPath;
201 if (program.gcc) {
202 testDir = path.join( testDir, 'out' );
203 }
204 execPath = path.join( testDir, 'Default', target );
205
206 console.log( execPath );
207
208 cp.spawn(
209 execPath,
210 [], {
211 stdio: 'pipe'
212 })
213 .on( 'close', function( code ) {
214 cb( code );
215 })
216 .stdout.on( 'data', function( data ) {
217 cursor.blue();
218 process.stdout.write( defFile + ': ' );
219 cursor.reset();
220 console.log( data.toString() );
221 });
222 }
223
224 function readTargetName(defFile, testDir, cb) {
225 var defPath = path.join( testDir, defFile );
226 fs.readFile( defPath, function( err, data ) {
227 if (err) {
228 cursor.red();
229 process.stdout.write( defFile + ': ' );
230 cursor.reset();
231 console.log( err );
232 }
233 else {
234 var matches = data.toString().match( /'target_name'\s*:\s*'(.*)'/ )
235 if (matches) {
236 cb( matches[1] );
237 }
238 }
239 } );
240 }
241 }
File test/plank/bin/update.js deleted (index cc17036..0000000)
1 #!/usr/bin/env node
2
3 var assert = require( 'assert' )
4 , cp = require( 'child_process' )
5 , Reader = require( './Reader' );
6
7 function update( dependencies, index ) {
8 if (typeof index === 'undefined') {
9 index = 0;
10 }
11
12 if (index < dependencies.length) {
13 var name = Reader.libName( dependencies[index] );
14 cp.exec(
15 'git subtree pull -P ' + name + ' ' + name + ' master --squash',
16 function(error, stdout, stderr) {
17 if (error) throw error;
18 console.log( stdout );
19 update( dependencies, index + 1 );
20 } );
21 }
22 }
23
24 update( Reader.readDependencies() );
File test/plank/change_log.txt deleted (index e69de29..0000000)
File test/plank/def/cpp11-gcc.gypi deleted (index 9d42827..0000000)
1 {
2 'target_defaults': {
3 'cflags': [ '-std=c++11' ],
4 'ldflags': [ '-pthread' ],
5 },
6 'make_global_settings': [
7 ['CC', '/usr/bin/g++'],
8 ['CXX', '/usr/bin/g++'],
9 ],
10 }
File test/plank/def/cpp11.gypi deleted (index 4e0a34a..0000000)
1 {
2 'target_defaults': {
3 'cflags': [ '-std=c++11', '-stdlib=libc++' ],
4 'ldflags': [ '-stdlib=libc++' ],
5 }
6 }
File test/plank/def/mac-targets.gypi deleted (index 9830c94..0000000)
1 {
2 'targets': [
3 {
4 'conditions': [
5 [
6 'OS=="mac"', {
7 'xcode_settings': {
8 'OTHER_CFLAGS': [
9 '-std=c++11', '-stdlib=libc++'
10 ],
11 }#xcode-settings
12 } #mac
13 ],
14 [
15 'OS=="ios"', {
16 'mac_bundle': 1,
17 'xcode_settings': {
18 'SDKROOT': 'iphoneos',
19 'TARGETED_DEVICE_FAMILY': '1,2',
20 'CODE_SIGN_IDENTITY': 'iPhone Developer',
21 'IPHONEOS_DEPLOYMENT_TARGET': '5.0',
22 'ARCHS': '$(ARCHS_STANDARD_32_64_BIT)',
23 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11',
24 'CLANG_CXX_LIBRARY': 'libc++',
25 'INFOPLIST_FILE': 'test-Info.plist'
26 } #xcode_settings
27 } #ios
28 ],
29 ] #conditions
30 }
31 ], #targets
32 }
File test/plank/example/.gitignore deleted (index aaab5ad..0000000)
1 .DS_Store
2 build/
File test/plank/example/def/main.gypi deleted (index d237f45..0000000)
1 {
2 'includes': [
3 '../../def/cpp11.gypi',
4 '../../def/mac-targets.gypi'
5 ]
6 }
File test/plank/example/test/def/test.gyp deleted (index bbcfc77..0000000)
1 {
2 'includes':[
3 '../../def/main.gypi',
4 ],#inclues
5 'target_defaults': {
6 'target_name': 'test2',
7 'type': 'executable',
8 'sources': [
9 '../src/main.cpp',
10 ], #sources
11 'include_dirs': [
12 '../../../src/'
13 ], #include_dirs
14 }, #target_defaults
15 }
File test/plank/example/test/def/test2.gyp deleted (index 77c11c1..0000000)
1 {
2 'includes':[
3 '../../def/main.gypi',
4 ],#inclues
5 'target_defaults': {
6 'target_name': 'test',
7 'type': 'executable',
8 'sources': [
9 '../src/other.cpp',
10 ], #sources
11 'include_dirs': [
12 '../../../src/'
13 ], #include_dirs
14 }, #target_defaults
15 }
File test/plank/example/test/src/main.cpp deleted (index ea2bc92..0000000)
1 #include "test.h"
2
3 #include <iostream>
4
5 int main(int argc, const char * argv[])
6 {
7 ASSERT( false );
8
9 using namespace std;
10 cout << "hello" << endl;
11 return 0;
12 }
File test/plank/example/test/src/other.cpp deleted (index 87dfea3..0000000)
1 #include "test.h"
2
3 #include <iostream>
4
5 int main(int argc, const char * argv[])
6 {
7 ASSERT( true );
8
9 using namespace std;
10 cout << "hello" << endl;
11 return 0;
12 }
File test/plank/m_.json deleted (index c3dcdc4..0000000)
1 {
2 "dependencies": [
3 "https://github.com/mucbuc/traverse.git"
4 ]
5 }
File test/plank/package.json deleted (index 8b2c15b..0000000)
1 {
2 "name": "plank",
3 "version": "0.0.0",
4 "description": "cpm",
5 "main": "none",
6 "directories": {
7 "test": "test"
8 },
9 "scripts": {
10 "test": "node test/test.js"
11 },
12 "repository": {
13 "type": "git",
14 "url": "https:///github.com/mucbuc/plank.git"
15 },
16 "author": "mbusenitz@gmail.com",
17 "license": "GNU",
18 "dependencies": {
19 "graceful-fs": "*",
20 "fs-extra": "*",
21 "ansi": "*",
22 "commander": "*"
23 }
24 }
File test/plank/src/test.h deleted (index bf3768e..0000000)
1 #ifndef TEST_H
2 #define TEST_H
3
4 #include <iostream>
5
6 static const char * code_red( "\x1b[31m" );
7 static const char * code_reset( "\x1b[39;49m" );
8
9 #define ASSERT( p ) \
10 if (!(p)) { \
11 using namespace std; \
12 cout << code_red; \
13 cout << "* assert failed *\n"; \
14 cout << __FILE__ << ":"; \
15 cout << __LINE__ << ":\n"; \
16 cout << " " << __PRETTY_FUNCTION__; \
17 cout << code_reset << endl; \
18 exit(1); \
19 }
20
21 #define FOOTER std::cout << __FUNCTION__ << " passed" << std::endl;
22
23 #endif // TEST_H
File test/test.gyp changed (mode: 100644) (index 77f1728..f726751)
2 2 'includes':[ 'includes':[
3 3 'lib/dynamo/def.gypi', 'lib/dynamo/def.gypi',
4 4 'plank/def/mac-targets.gypi', 'plank/def/mac-targets.gypi',
5 'plank/def/cpp11.gypi'
5 'plank/def/plank.gypi'
6 6 ],#includes ],#includes
7 7 'target_defaults': { 'target_defaults': {
8 8 'target_name': 'test', 'target_name': 'test',
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/mucbuc/dynamo

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/mucbuc/dynamo

Clone this repository using git:
git clone git://git.rocketgit.com/user/mucbuc/dynamo

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main