File tree 8 files changed +55
-26
lines changed
8 files changed +55
-26
lines changed Original file line number Diff line number Diff line change 1
- .git
2
1
codeship- * .yml
3
2
deployment.env
4
3
deployment.env.encrypted
5
- vendor /**
6
- ! vendor /autoload.php
7
4
storage /app /public /**
8
5
storage /app /temp /**
9
6
storage /framework /cache /**
Original file line number Diff line number Diff line change
1
+ build :
2
+ cp -R -u -p -v ./.env.example ./.env
3
+ docker-compose build
4
+
5
+ down :
6
+ docker-compose down
7
+
8
+ up :
9
+ docker-compose up -d
10
+ docker-compose exec platform composer run compile
11
+
12
+ enter :
13
+ docker-compose exec platform bash
14
+
15
+ pre-test :
16
+ docker-compose exec platform composer run pre-test
17
+
18
+ test :
19
+ docker-compose exec platform composer run test-dev
20
+
21
+ test-ci :
22
+ docker-compose exec platform composer run test
23
+
24
+ cleanup :
25
+ docker-compose exec platform composer run fixlint
26
+
27
+ down :
28
+ docker-compose down
29
+
30
+ stop :
31
+ docker-compose stop
Original file line number Diff line number Diff line change 3
3
image : build
4
4
dockerfile_path : docker/build.Dockerfile
5
5
volumes :
6
- - .:/vols/src
7
- - ./tmp/out:/vols /out
6
+ - .:/var/www
7
+ - ./tmp/out:/tmp /out
8
8
cached : true
9
9
default_cache_branch : develop
10
10
@@ -53,7 +53,7 @@ test/base: &_test_defaults
53
53
build : &_test_build_defaults
54
54
dockerfile_path : docker/test.Dockerfile
55
55
volumes :
56
- - .:/vols/src
56
+ - .:/var/www
57
57
environment : &_test_env_defaults
58
58
DB_PORT : 3306
59
59
DB_DATABASE : ushahidi
@@ -95,14 +95,14 @@ test/php-7.3:
95
95
aglio :
96
96
image : humangeo/aglio
97
97
volumes :
98
- - .:/vols/src
98
+ - .:/var/www
99
99
100
100
awscli :
101
101
build :
102
102
image : awscli
103
103
dockerfile_path : docker/awscli.Dockerfile
104
104
volumes :
105
- - .:/vols/src
105
+ - .:/var/www
106
106
encrypted_env_file : deployment.env.encrypted
107
107
cached : true
108
108
Original file line number Diff line number Diff line change 17
17
steps :
18
18
- name : " Docs (develop)"
19
19
service : aglio
20
- command : aglio -i /vols/src /docs/api/index.apib -o /vols/src /docs/api/index.html
20
+ command : aglio -i /var/www /docs/api/index.apib -o /var/www /docs/api/index.html
21
21
- name : " Deploy Docs (develop)"
22
22
service : awscli
23
- command : aws s3 sync /vols/src /docs/ s3://preview.ushahidi.com/platform/develop --acl public-read
23
+ command : aws s3 sync /var/www /docs/ s3://preview.ushahidi.com/platform/develop --acl public-read
24
24
25
25
- name : " Deployment director"
26
26
service : deploy
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ services:
39
39
- " 80:8080"
40
40
volumes :
41
41
- storage-app-public:/var/www/storage/app/public
42
- - ./:/vols/src
42
+ - .:/var/www
43
43
platform_tasks :
44
44
build : .
45
45
environment :
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
check_vols_src () {
4
- if [ ! -d /vols/src ]; then
5
- echo " No /vols/src with code"
4
+ if [ ! -d /var/www ]; then
5
+ echo " No /var/www with code"
6
6
exit 1
7
7
fi
8
8
}
9
9
check_vols_out () {
10
- if [ ! -d /vols /out ]; then
11
- echo " No /vols /out for output!"
10
+ if [ ! -d /var /out ]; then
11
+ echo " No /var /out for output!"
12
12
exit 1
13
13
fi
14
14
}
@@ -27,7 +27,7 @@ function sync {
27
27
echo " - vendor"
28
28
echo " - tmp"
29
29
} > /tmp/rsync_exclude
30
- rsync -ar --exclude-from=/tmp/rsync_exclude --delete-during /vols/src / ./
30
+ rsync -ar --exclude-from=/tmp/rsync_exclude --delete-during /var/www / ./
31
31
}
32
32
33
33
function run_composer_install {
@@ -37,7 +37,7 @@ function run_composer_install {
37
37
function bundle {
38
38
check_vols_out
39
39
local version=${GITHUB_VERSION:- ${CI_BRANCH:- v0.0.0} }
40
- DEST_DIR=/vols /out ./bin/release $version
40
+ DEST_DIR=/var /out ./bin/release $version
41
41
}
42
42
43
43
sync
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ function copy_external_config() {
17
17
}
18
18
19
19
function check_vols_src() {
20
- if [ ! -d /vols/src ]; then
21
- echo " No /vols/src with code"
20
+ if [ ! -d /var/www ]; then
21
+ echo " No /var/www with code"
22
22
exit 1
23
23
fi
24
24
}
@@ -93,7 +93,7 @@ function sync {
93
93
echo " - storage/passport/**"
94
94
echo " - tmp"
95
95
} > /tmp/rsync_exclude
96
- rsync -ar --exclude-from=/tmp/rsync_exclude --delete-during /vols/src / ./
96
+ rsync -ar --exclude-from=/tmp/rsync_exclude --delete-during /var/www / ./
97
97
rm -f phpunit.xml behat.yml phpspec.yml
98
98
}
99
99
Original file line number Diff line number Diff line change @@ -46,13 +46,14 @@ public function __construct(\Ushahidi\DataSource\DataSourceManager $sources)
46
46
protected function getSources ()
47
47
{
48
48
if ($ source = $ this ->option ('source ' )) {
49
- $ sources = [$ source ];
50
- } elseif ( $ this -> option ( ' all ' )) {
51
- $ sources = $ this -> sources -> getSources ();
52
- } else {
53
- $ sources = $ this ->sources ->getEnabledSources ();
49
+ return [$ source ];
50
+ }
51
+
52
+ if ( $ this -> option ( ' all ' )) {
53
+ return $ this ->sources ->getSources ();
54
54
}
55
- return $ sources ;
55
+
56
+ return $ this ->sources ->getEnabledSources ();
56
57
}
57
58
58
59
public function handle ()
You can’t perform that action at this time.
0 commit comments