Add Makefile and remove the scripts directory
This commit is contained in:
parent
cea32af406
commit
6079233a07
|
|
@ -20,6 +20,7 @@ Improvements:
|
||||||
* Enable support for Github Enterprise when using Github Authentication
|
* Enable support for Github Enterprise when using Github Authentication
|
||||||
* Update iCalendar library to display organizer name
|
* Update iCalendar library to display organizer name
|
||||||
* Run automated unit tests with Sqlite/Mysql/Postgres on Travis-ci
|
* Run automated unit tests with Sqlite/Mysql/Postgres on Travis-ci
|
||||||
|
* Add Makefile and remove the scripts directory
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
BUILD_DIR = /tmp
|
||||||
|
|
||||||
|
CSS_APP = $(addprefix assets/css/src/, $(addsuffix .css, base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown screenshot filters gantt))
|
||||||
|
CSS_PRINT = $(addprefix assets/css/src/, $(addsuffix .css, print links table board task comment subtask markdown))
|
||||||
|
CSS_VENDOR = $(addprefix assets/css/vendor/, $(addsuffix .css, jquery-ui.min jquery-ui-timepicker-addon.min chosen.min fullcalendar.min font-awesome.min c3.min))
|
||||||
|
|
||||||
|
JS_APP = $(addprefix assets/js/src/, $(addsuffix .js, Popover Dropdown Tooltip Markdown Sidebar Search App Screenshot Calendar Board Swimlane Gantt TaskRepartitionChart UserRepartitionChart CumulativeFlowDiagram BurndownChart BudgetChart AvgTimeColumnChart TaskTimeColumnChart LeadCycleTimeChart Router))
|
||||||
|
JS_VENDOR = $(addprefix assets/js/vendor/, $(addsuffix .js, jquery-1.11.1.min jquery-ui.min jquery-ui-timepicker-addon.min chosen.jquery.min moment.min fullcalendar.min mousetrap.min mousetrap-global-bind.min))
|
||||||
|
JS_LANG = $(addprefix assets/js/vendor/lang/, $(addsuffix .js, da de es fi fr hu it ja nl pl pt pt-br ru sv sr th tr zh-cn))
|
||||||
|
|
||||||
|
all: css js
|
||||||
|
|
||||||
|
vendor.css:
|
||||||
|
@ cat ${CSS_VENDOR} > vendor.css
|
||||||
|
|
||||||
|
app.css:
|
||||||
|
@ rm -f assets/css/app.css
|
||||||
|
@ cat ${CSS_APP} > tmp.css
|
||||||
|
@ yuicompressor --charset utf-8 --type css -o tmp.css tmp.css
|
||||||
|
@ cat vendor.css tmp.css >> assets/css/app.css
|
||||||
|
@ rm -f tmp.css
|
||||||
|
|
||||||
|
print.css:
|
||||||
|
@ rm -f assets/css/print.css
|
||||||
|
@ cat ${CSS_PRINT} > tmp.css
|
||||||
|
@ yuicompressor --charset utf-8 --type css -o tmp.css tmp.css
|
||||||
|
@ cat vendor.css tmp.css >> assets/css/print.css
|
||||||
|
@ rm -f tmp.css
|
||||||
|
|
||||||
|
css: vendor.css app.css print.css
|
||||||
|
@ rm -f vendor.css
|
||||||
|
|
||||||
|
vendor.js:
|
||||||
|
@ cat ${JS_VENDOR} > vendor.js
|
||||||
|
@ cat ${JS_LANG} >> vendor.js
|
||||||
|
|
||||||
|
app.js:
|
||||||
|
@ rm -f assets/js/app.js
|
||||||
|
@ echo "(function() { 'use strict';" > tmp.js
|
||||||
|
@ cat ${JS_APP} >> tmp.js
|
||||||
|
@ echo "})();" >> tmp.js
|
||||||
|
@ yuicompressor --charset utf-8 --type js -o tmp.js tmp.js
|
||||||
|
@ cat vendor.js tmp.js >> assets/js/app.js
|
||||||
|
@ rm -f tmp.js
|
||||||
|
|
||||||
|
js: vendor.js app.js
|
||||||
|
@ rm -f vendor.js
|
||||||
|
|
||||||
|
archive:
|
||||||
|
@ echo "Build archive: version=${version}, destination=${dst}"
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard ${BUILD_DIR}/kanboard-*.zip
|
||||||
|
@ cd ${BUILD_DIR} && git clone --depth 1 -q https://github.com/fguillot/kanboard.git
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && composer --prefer-dist --no-dev --optimize-autoloader --quiet install
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/data/*
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/.git*
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/tests
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/docs
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/Makefile
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/Vagrantfile
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/Dockerfile
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/.*.yml
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/*.md
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/*.markdown
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/*.lock
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard/*.json
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && find ./vendor -name doc -type d -exec rm -rf {} +;
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && find ./vendor -name notes -type d -exec rm -rf {} +;
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && find ./vendor -name test -type d -exec rm -rf {} +;
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && find ./vendor -name tests -type d -exec rm -rf {} +;
|
||||||
|
@ find ${BUILD_DIR}/kanboard/vendor -name composer.json -delete
|
||||||
|
@ find ${BUILD_DIR}/kanboard/vendor -name phpunit.xml -delete
|
||||||
|
@ find ${BUILD_DIR}/kanboard/vendor -name .travis.yml -delete
|
||||||
|
@ find ${BUILD_DIR}/kanboard/vendor -name README.* -delete
|
||||||
|
@ find ${BUILD_DIR}/kanboard/vendor -name .gitignore -delete
|
||||||
|
@ cd ${BUILD_DIR}/kanboard && sed -i.bak s/master/${version}/g app/constants.php && rm -f app/*.bak
|
||||||
|
@ cd ${BUILD_DIR} && zip -r kanboard-${version}.zip kanboard > /dev/null
|
||||||
|
@ cd ${BUILD_DIR} && mv kanboard-${version}.zip ${dst}
|
||||||
|
@ cd ${dst} && if [ -L kanboard-latest.zip ]; then unlink kanboard-latest.zip; ln -s kanboard-${version}.zip kanboard-latest.zip; fi
|
||||||
|
@ rm -rf ${BUILD_DIR}/kanboard
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
|
@ -48,3 +48,4 @@ Related projects
|
||||||
- [Trello import script by @matueranet](https://github.com/matueranet/kanboard-import-trello)
|
- [Trello import script by @matueranet](https://github.com/matueranet/kanboard-import-trello)
|
||||||
- [Chrome extension by Timo](https://chrome.google.com/webstore/detail/kanboard-quickmenu/akjbeplnnihghabpgcfmfhfmifjljneh?utm_source=chrome-ntp-icon), [Source code](https://github.com/BlueTeck/kanboard_chrome_extension)
|
- [Chrome extension by Timo](https://chrome.google.com/webstore/detail/kanboard-quickmenu/akjbeplnnihghabpgcfmfhfmifjljneh?utm_source=chrome-ntp-icon), [Source code](https://github.com/BlueTeck/kanboard_chrome_extension)
|
||||||
- [Wunderlist To Kanboard script by EpocDotFr](https://github.com/EpocDotFr/WunderlistToKanboard)
|
- [Wunderlist To Kanboard script by EpocDotFr](https://github.com/EpocDotFr/WunderlistToKanboard)
|
||||||
|
- [Python client script by @dzudek](https://gist.github.com/fguillot/84c70d4928eb1e0cb374)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ defined('DEBUG') or define('DEBUG', false);
|
||||||
defined('DEBUG_FILE') or define('DEBUG_FILE', __DIR__.'/../data/debug.log');
|
defined('DEBUG_FILE') or define('DEBUG_FILE', __DIR__.'/../data/debug.log');
|
||||||
|
|
||||||
// Application version
|
// Application version
|
||||||
defined('APP_VERSION') or define('APP_VERSION', 'master');
|
defined('APP_VERSION') or define('APP_VERSION', '1.23');
|
||||||
|
|
||||||
// Database driver: sqlite, mysql or postgres
|
// Database driver: sqlite, mysql or postgres
|
||||||
defined('DB_DRIVER') or define('DB_DRIVER', 'sqlite');
|
defined('DB_DRIVER') or define('DB_DRIVER', 'sqlite');
|
||||||
|
|
|
||||||
1857
assets/css/app.css
1857
assets/css/app.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -18,7 +18,7 @@ input[type="text"] {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
font-size: 1.0em;
|
font-size: 100%;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
|
@ -49,7 +49,7 @@ textarea {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
max-width: 99%;
|
max-width: 99%;
|
||||||
height: 200px;
|
height: 200px;
|
||||||
font-size: 1.0em;
|
font-size: 100%;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,16 +1,24 @@
|
||||||
How to build assets (Javascript and CSS files)?
|
How to build assets (Javascript and CSS files)
|
||||||
===============================================
|
==============================================
|
||||||
|
|
||||||
Stylesheet and Javascript files are merged together and minified.
|
Stylesheet and Javascript files are merged together and minified.
|
||||||
|
|
||||||
- Original CSS files are stored in the folder `assets/css/src/*.css`
|
- Original CSS files are stored in the folder `assets/css/src/*.css`
|
||||||
- Original Javascript code is stored in the folder `assets/js/src/*.js`
|
- Original Javascript code is stored in the folder `assets/js/src/*.js`
|
||||||
|
|
||||||
To make a new build run this shell-script from a terminal:
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
```bash
|
- Unix operating system
|
||||||
./scripts/make-assets.sh
|
- make
|
||||||
```
|
- yuicompressor in your path (`brew install yuicompressor`)
|
||||||
|
|
||||||
|
Build assets
|
||||||
|
------------
|
||||||
|
|
||||||
|
- Build Stylesheet files: `make css`
|
||||||
|
- Build Javascript files: `make js`
|
||||||
|
- Build both: `make`
|
||||||
|
|
||||||
This script generates the files `assets/css/app.css` and `assets/js/app.js`.
|
This script generates the files `assets/css/app.css` and `assets/js/app.js`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Deny from all
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\Project;
|
|
||||||
use Model\ProjectPermission;
|
|
||||||
|
|
||||||
$projectModel = new Project($container);
|
|
||||||
$permissionModel = new ProjectPermission($container);
|
|
||||||
|
|
||||||
for ($i = 0; $i < 100; $i++) {
|
|
||||||
$id = $projectModel->create(array(
|
|
||||||
'name' => 'Project #'.$i
|
|
||||||
));
|
|
||||||
|
|
||||||
$permissionModel->addMember($id, 1);
|
|
||||||
}
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\TaskCreation;
|
|
||||||
use Model\Subtask;
|
|
||||||
use Model\Project;
|
|
||||||
use Model\ProjectPermission;
|
|
||||||
use Model\User;
|
|
||||||
|
|
||||||
$task_per_column = 200;
|
|
||||||
|
|
||||||
$userModel = new User($container);
|
|
||||||
$projectModel = new Project($container);
|
|
||||||
$permissionModel = new ProjectPermission($container);
|
|
||||||
$taskModel = new TaskCreation($container);
|
|
||||||
$subtaskModel = new Subtask($container);
|
|
||||||
|
|
||||||
$project_id = $projectModel->create(array(
|
|
||||||
'name' => 'Project #1'
|
|
||||||
));
|
|
||||||
|
|
||||||
$permissionModel->addMember($project_id, 1);
|
|
||||||
|
|
||||||
for ($i = 0; $i <= 5; $i++) {
|
|
||||||
$userModel->create(array(
|
|
||||||
'username' => 'user'.$i,
|
|
||||||
'password' => 'password'.$i,
|
|
||||||
'name' => 'User #'.$i,
|
|
||||||
'email' => 'user'.$i.'@localhost',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (array(1, 2, 3, 4) as $column_id) {
|
|
||||||
|
|
||||||
for ($i = 1; $i <= $task_per_column; $i++) {
|
|
||||||
|
|
||||||
$task = array(
|
|
||||||
'title' => 'Task #'.$i.'-'.$column_id,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => $column_id,
|
|
||||||
'owner_id' => 1,
|
|
||||||
'color_id' => mt_rand(0, 1) === 0 ? 'green' : 'purple',
|
|
||||||
'score' => mt_rand(0, 21),
|
|
||||||
'is_active' => mt_rand(0, 1),
|
|
||||||
);
|
|
||||||
|
|
||||||
$id = $taskModel->create($task);
|
|
||||||
|
|
||||||
$subtaskModel->create(array(
|
|
||||||
'title' => 'Subtask of task #'.$id,
|
|
||||||
'user_id' => 1,
|
|
||||||
'status' => mt_rand(0, 2),
|
|
||||||
'task_id' => $id,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\User;
|
|
||||||
|
|
||||||
$userModel = new User($container);
|
|
||||||
|
|
||||||
for ($i = 0; $i < 500; $i++) {
|
|
||||||
$userModel->create(array(
|
|
||||||
'username' => 'user'.$i,
|
|
||||||
'password' => 'password'.$i,
|
|
||||||
'name' => 'User #'.$i,
|
|
||||||
'email' => 'user'.$i.'@localhost',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\ProjectDailyColumnStats;
|
|
||||||
use Model\TaskCreation;
|
|
||||||
use Model\TaskStatus;
|
|
||||||
|
|
||||||
$pds = new ProjectDailyColumnStats($container);
|
|
||||||
$taskCreation = new TaskCreation($container);
|
|
||||||
$taskStatus = new TaskStatus($container);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= 15; $i++) {
|
|
||||||
|
|
||||||
$task = array(
|
|
||||||
'title' => 'Task #'.$i,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => rand(1, 4),
|
|
||||||
'score' => rand(1, 21)
|
|
||||||
);
|
|
||||||
|
|
||||||
$taskCreation->create($task);
|
|
||||||
}
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-7 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-6 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(2);
|
|
||||||
$taskStatus->close(3);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-5 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(4);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-4 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(5);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-3 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(6);
|
|
||||||
$taskStatus->close(7);
|
|
||||||
$taskStatus->close(8);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-2 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(9);
|
|
||||||
$taskStatus->close(10);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-2 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(12);
|
|
||||||
$taskStatus->close(13);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-1 days')));
|
|
||||||
|
|
||||||
$taskStatus->close(1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d'));
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\ProjectDailyColumnStats;
|
|
||||||
use Model\TaskCreation;
|
|
||||||
use Model\TaskPosition;
|
|
||||||
|
|
||||||
$pds = new ProjectDailyColumnStats($container);
|
|
||||||
$taskCreation = new TaskCreation($container);
|
|
||||||
$taskPosition = new TaskPosition($container);
|
|
||||||
|
|
||||||
for ($i = 1; $i <= 15; $i++) {
|
|
||||||
|
|
||||||
$task = array(
|
|
||||||
'title' => 'Task #'.$i,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
);
|
|
||||||
|
|
||||||
$taskCreation->create($task);
|
|
||||||
}
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-7 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 1, 2, 1);
|
|
||||||
$taskPosition->movePosition(1, 2, 2, 1);
|
|
||||||
$taskPosition->movePosition(1, 3, 2, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-6 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 3, 3, 1);
|
|
||||||
$taskPosition->movePosition(1, 4, 3, 1);
|
|
||||||
$taskPosition->movePosition(1, 5, 3, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-5 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 5, 4, 1);
|
|
||||||
$taskPosition->movePosition(1, 6, 4, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-4 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 7, 4, 1);
|
|
||||||
$taskPosition->movePosition(1, 8, 4, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-3 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 9, 3, 1);
|
|
||||||
$taskPosition->movePosition(1, 10, 2, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-2 days')));
|
|
||||||
|
|
||||||
$taskCreation->create(array('title' => 'Random task', 'project_id' => 1));
|
|
||||||
$taskPosition->movePosition(1, 11, 2, 1);
|
|
||||||
$taskPosition->movePosition(1, 12, 4, 1);
|
|
||||||
$taskPosition->movePosition(1, 13, 4, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-2 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 14, 3, 1);
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-1 days')));
|
|
||||||
|
|
||||||
$taskPosition->movePosition(1, 15, 4, 1);
|
|
||||||
$taskPosition->movePosition(1, 16, 4, 1);
|
|
||||||
|
|
||||||
$taskCreation->create(array('title' => 'Random task', 'project_id' => 1));
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d'));
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require __DIR__.'/../app/common.php';
|
|
||||||
|
|
||||||
use Model\Project;
|
|
||||||
use Model\ProjectDailyStats;
|
|
||||||
|
|
||||||
$p = new Project($container);
|
|
||||||
$pds = new ProjectDailyStats($container);
|
|
||||||
|
|
||||||
$p->create(array('name' => 'Test Lead/Cycle time'));
|
|
||||||
|
|
||||||
$container['db']->table('tasks')->insert(array(
|
|
||||||
'title' => 'Lead time = 4d | Cycle time = 3d',
|
|
||||||
'date_creation' => strtotime('-7 days'),
|
|
||||||
'date_started' => strtotime('-6 days'),
|
|
||||||
'date_completed' => strtotime('-3 days'),
|
|
||||||
'is_active' => 0,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
));
|
|
||||||
|
|
||||||
$container['db']->table('tasks')->insert(array(
|
|
||||||
'title' => 'Lead time = 1d | Cycle time = 1d',
|
|
||||||
'date_creation' => strtotime('-7 days'),
|
|
||||||
'date_started' => strtotime('-7 days'),
|
|
||||||
'date_completed' => strtotime('-6 days'),
|
|
||||||
'is_active' => 0,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
));
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-6 days')));
|
|
||||||
|
|
||||||
$container['db']->table('tasks')->insert(array(
|
|
||||||
'title' => 'Lead time = 7d | Cycle time = 5d',
|
|
||||||
'date_creation' => strtotime('-7 days'),
|
|
||||||
'date_started' => strtotime('-5 days'),
|
|
||||||
'date_completed' => strtotime('today'),
|
|
||||||
'is_active' => 0,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
));
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-5 days')));
|
|
||||||
|
|
||||||
$container['db']->table('tasks')->insert(array(
|
|
||||||
'title' => 'Lead time = 1d | Cycle time = 0',
|
|
||||||
'date_creation' => strtotime('-3 days'),
|
|
||||||
'date_started' => 0,
|
|
||||||
'date_completed' => 0,
|
|
||||||
'is_active' => 0,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
));
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-4 days')));
|
|
||||||
|
|
||||||
$container['db']->table('tasks')->insert(array(
|
|
||||||
'title' => 'Lead time = 1d | Cycle time = 1d',
|
|
||||||
'date_creation' => strtotime('-3 days'),
|
|
||||||
'date_started' => strtotime('-3 days'),
|
|
||||||
'date_completed' => 0,
|
|
||||||
'is_active' => 0,
|
|
||||||
'project_id' => 1,
|
|
||||||
'column_id' => 1,
|
|
||||||
));
|
|
||||||
|
|
||||||
$pds->updateTotals(1, date('Y-m-d', strtotime('-3 days')));
|
|
||||||
1104
scripts/kanboard.py
1104
scripts/kanboard.py
File diff suppressed because it is too large
Load Diff
|
|
@ -1,73 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$#" -lt 1 ]
|
|
||||||
then
|
|
||||||
echo "Usage: $0 <version> [destination]"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
APP="kanboard"
|
|
||||||
VERSION=$1
|
|
||||||
DESTINATION=$2
|
|
||||||
|
|
||||||
if [ -z "$2" ]
|
|
||||||
then
|
|
||||||
DESTINATION=~/Devel/websites/$APP
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Build package for version $VERSION => $DESTINATION"
|
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
rm -rf /tmp/$APP /tmp/$APP-*.zip 2>/dev/null
|
|
||||||
|
|
||||||
# Download source code
|
|
||||||
cd /tmp
|
|
||||||
git clone --depth 1 -q https://github.com/fguillot/$APP.git >/dev/null
|
|
||||||
|
|
||||||
# Install vendors
|
|
||||||
cd /tmp/$APP
|
|
||||||
composer --prefer-dist --no-dev --optimize-autoloader --quiet install
|
|
||||||
|
|
||||||
# Remove useless files
|
|
||||||
rm -rf data/*.sqlite \
|
|
||||||
.git \
|
|
||||||
.gitignore \
|
|
||||||
scripts \
|
|
||||||
tests \
|
|
||||||
Vagrantfile \
|
|
||||||
.*.yml \
|
|
||||||
*.md \
|
|
||||||
*.markdown \
|
|
||||||
docs \
|
|
||||||
Dockerfile \
|
|
||||||
composer.* \
|
|
||||||
app.json
|
|
||||||
|
|
||||||
find ./vendor -name doc -type d -exec rm -rf {} +;
|
|
||||||
find ./vendor -name notes -type d -exec rm -rf {} +;
|
|
||||||
find ./vendor -name test -type d -exec rm -rf {} +;
|
|
||||||
find ./vendor -name tests -type d -exec rm -rf {} +;
|
|
||||||
find ./vendor -name composer.json -delete
|
|
||||||
find ./vendor -name phpunit.xml -delete
|
|
||||||
find ./vendor -name .travis.yml -delete
|
|
||||||
find ./vendor -name README.* -delete
|
|
||||||
find ./vendor -name .gitignore -delete
|
|
||||||
|
|
||||||
# Set the version number
|
|
||||||
sed -i.bak s/master/$VERSION/g app/constants.php && rm -f app/*.bak
|
|
||||||
|
|
||||||
# Make the archive
|
|
||||||
cd /tmp
|
|
||||||
zip -r $APP-$VERSION.zip $APP > /dev/null
|
|
||||||
mv $APP-$VERSION.zip $DESTINATION
|
|
||||||
|
|
||||||
cd $DESTINATION
|
|
||||||
|
|
||||||
# Make symlink for generic archive
|
|
||||||
if [ -L $APP-latest.zip ]
|
|
||||||
then
|
|
||||||
unlink $APP-latest.zip
|
|
||||||
ln -s $APP-$VERSION.zip $APP-latest.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf /tmp/$APP 2>/dev/null
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
print_css="print links table board task comment subtask markdown"
|
|
||||||
app_css="base links title table form button alert tooltip header board task comment subtask markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown screenshot filters gantt"
|
|
||||||
vendor_css="jquery-ui.min jquery-ui-timepicker-addon.min chosen.min fullcalendar.min font-awesome.min c3.min"
|
|
||||||
|
|
||||||
app_js="Popover Dropdown Tooltip Markdown Sidebar Search App Screenshot Calendar Board Swimlane Gantt TaskRepartitionChart UserRepartitionChart CumulativeFlowDiagram BurndownChart BudgetChart AvgTimeColumnChart TaskTimeColumnChart LeadCycleTimeChart Router"
|
|
||||||
vendor_js="jquery-1.11.1.min jquery-ui.min jquery-ui-timepicker-addon.min chosen.jquery.min moment.min fullcalendar.min mousetrap.min mousetrap-global-bind.min app.min"
|
|
||||||
lang_js="da de es fi fr hu it ja nl pl pt pt-br ru sv sr th tr zh-cn"
|
|
||||||
|
|
||||||
function merge_css {
|
|
||||||
|
|
||||||
local app_file="assets/css/app.css"
|
|
||||||
local print_file="assets/css/print.css"
|
|
||||||
|
|
||||||
rm -f $app_file 2>/dev/null
|
|
||||||
rm -f $print_file 2>/dev/null
|
|
||||||
echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $app_file
|
|
||||||
echo "/************************************/" >> $app_file
|
|
||||||
echo "/* DO NOT EDIT: AUTO-GENERATED FILE */" > $print_file
|
|
||||||
echo "/************************************/" >> $print_file
|
|
||||||
|
|
||||||
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $app_file; done
|
|
||||||
for file in $vendor_css; do cat "assets/css/vendor/${file}.css" >> $print_file; done
|
|
||||||
|
|
||||||
for file in $app_css; do cat "assets/css/src/${file}.css" >> $app_file; done
|
|
||||||
for file in $print_css; do cat "assets/css/src/${file}.css" >> $print_file; done
|
|
||||||
}
|
|
||||||
|
|
||||||
function minify_js {
|
|
||||||
|
|
||||||
local tmp_file="assets/js/minify.js"
|
|
||||||
local dst_file="assets/js/vendor/app.min.js"
|
|
||||||
|
|
||||||
rm -f $dst_file $tmp_file 2>/dev/null
|
|
||||||
|
|
||||||
echo "(function() { 'use strict';" > $tmp_file;
|
|
||||||
for file in $app_js; do cat "assets/js/src/${file}.js" >> $tmp_file; done
|
|
||||||
echo "})();" >> $tmp_file;
|
|
||||||
|
|
||||||
curl -s \
|
|
||||||
-d compilation_level=SIMPLE_OPTIMIZATIONS \
|
|
||||||
-d output_format=text \
|
|
||||||
-d output_info=compiled_code \
|
|
||||||
--data-urlencode "js_code@${tmp_file}" \
|
|
||||||
http://closure-compiler.appspot.com/compile > $dst_file
|
|
||||||
|
|
||||||
rm -f $tmp_file 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
function merge_js {
|
|
||||||
|
|
||||||
local tmp_file="assets/js/vendor/app.min.js"
|
|
||||||
local dst_file="assets/js/app.js"
|
|
||||||
|
|
||||||
rm -f $dst_file 2>/dev/null
|
|
||||||
|
|
||||||
for file in $vendor_js; do cat "assets/js/vendor/${file}.js" >> $dst_file; done
|
|
||||||
for file in $lang_js; do cat "assets/js/vendor/lang/${file}.js" >> $dst_file; done
|
|
||||||
|
|
||||||
rm -f $tmp_file 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
merge_css
|
|
||||||
minify_js
|
|
||||||
merge_js
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
VERSION=$1
|
|
||||||
|
|
||||||
git tag -a v$VERSION -m "Version $VERSION"
|
|
||||||
git push origin v$VERSION
|
|
||||||
Loading…
Reference in New Issue