Skip to content

Commit c8fe7c3

Browse files
authored
Merge pull request #433 from crowdbotics/qa
Release QA to Production
2 parents 30157f8 + 3c660e7 commit c8fe7c3

File tree

8 files changed

+50
-6
lines changed

8 files changed

+50
-6
lines changed

cookiecutter.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
default_context:
2+
project_name: "demo"
3+
project_slug: "demo"
4+
project_generated_name: "demo"
5+
owner_email: "[email protected]"
6+
custom_domain: "demo.botics.co"
7+
repo_url: "https://github.com/crowdbotics/modules"
8+
heroku_dyno_size: "free"
9+
heroku_team: ""
10+
is_mobile: "y"

dist/cookie/{{cookiecutter.project_slug}}/.crowdbotics.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scaffold": {
33
"type": "react-native",
4-
"version": "2.7.0",
4+
"version": "2.7.1",
55
"cookiecutter_context": {
66
"project_name": "{{cookiecutter.project_name}}",
77
"project_slug": "{{cookiecutter.project_slug}}",

dist/cookie/{{cookiecutter.project_slug}}/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM crowdbotics/cb-django:3.8-slim-buster AS build
1+
FROM crowdbotics/cb-django:3.9-slim-buster AS build
22

33
# Copy dependency management files and install app packages to /.venv
44
COPY backend/Pipfile backend/Pipfile.lock /
@@ -11,7 +11,7 @@ COPY . .
1111
RUN yarn install && yarn run web:build
1212

1313

14-
FROM crowdbotics/cb-django:3.8-slim-buster AS release
14+
FROM crowdbotics/cb-django:3.9-slim-buster AS release
1515
ARG SECRET_KEY
1616

1717
# Set Working directory

dist/react-native-demo.zip

691 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"semver": "node scripts/semver.js",
1111
"cookie": "node scripts/cookie.js",
12+
"demo": "node scripts/demo.js",
1213
"raw": "node scripts/raw.js",
1314
"template": "node scripts/template.js",
1415
"bootstrap": "npm run raw; npm run cookie",

scaffold/template/custom/.crowdbotics.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scaffold": {
33
"type": "react-native",
4-
"version": "2.7.0",
4+
"version": "2.7.1",
55
"cookiecutter_context": {
66
"project_name": "{{cookiecutter.project_name}}",
77
"project_slug": "{{cookiecutter.project_slug}}",

scaffold/template/custom/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM crowdbotics/cb-django:3.8-slim-buster AS build
1+
FROM crowdbotics/cb-django:3.9-slim-buster AS build
22

33
# Copy dependency management files and install app packages to /.venv
44
COPY backend/Pipfile backend/Pipfile.lock /
@@ -11,7 +11,7 @@ COPY . .
1111
RUN yarn install && yarn run web:build
1212

1313

14-
FROM crowdbotics/cb-django:3.8-slim-buster AS release
14+
FROM crowdbotics/cb-django:3.9-slim-buster AS release
1515
ARG SECRET_KEY
1616

1717
# Set Working directory

scripts/demo.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import path from "path";
2+
import { execSync } from "child_process";
3+
import fs from "fs";
4+
5+
const demoPath = path.join(process.cwd(), "demo");
6+
7+
const options = {
8+
encoding: "utf8",
9+
stdio: "inherit",
10+
cwd: path.dirname(demoPath)
11+
};
12+
const yaml = path.join(process.cwd(), "cookiecutter.yaml");
13+
14+
function removeDir(dir) {
15+
if (fs.existsSync(dir)) {
16+
fs.rmSync(dir, { recursive: true });
17+
}
18+
}
19+
20+
removeDir(demoPath);
21+
22+
const rnCookieCutterCommand = [
23+
"pipenv run cookiecutter",
24+
"./dist/cookie",
25+
`--config-file ${yaml}`,
26+
"--no-input"
27+
].join(" ");
28+
29+
execSync(rnCookieCutterCommand, options);
30+
31+
execSync(`cd ${demoPath} && zip -r ../dist/react-native-demo.zip .`, options);
32+
33+
removeDir(demoPath);

0 commit comments

Comments
 (0)