fix(deploy): misc. re-arrange scripts and organize

This commit is contained in:
Mrugesh Mohapatra
2019-06-17 05:16:35 +05:30
committed by mrugesh
parent a6afaf1eb6
commit c5fd478d9a
20 changed files with 5031 additions and 43 deletions

View File

@ -2,10 +2,10 @@ const fs = require('fs');
const path = require('path');
const debug = require('debug');
const env = require('../../config/env');
const env = require('../../../config/env');
const { getChallengesForLang } = require('../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
const { createRedirects } = require('./createRedirects');
@ -20,10 +20,10 @@ const {
newsLocation: news
} = env;
const apiPath = path.resolve(__dirname, '../../api-server');
const clientPath = path.resolve(__dirname, '../../client');
const apiPath = path.resolve(__dirname, '../../../api-server');
const clientPath = path.resolve(__dirname, '../../../client');
const clientStaticPath = path.resolve(clientPath, 'static');
const globalConfigPath = path.resolve(__dirname, '../../config');
const globalConfigPath = path.resolve(__dirname, '../../../config');
if (NODE_ENV === 'production') {
const redirects = createRedirects({ api, news, forum });

View File

@ -2,8 +2,8 @@ const fs = require('fs');
const path = require('path');
const debug = require('debug');
const { getChallengesForLang } = require('../../curriculum/getChallenges');
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
const log = debug('fcc:tools:ensure-env');

4966
tools/scripts/build/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
{
"name": "@freecodecamp/scripts-build",
"private": true,
"version": "0.0.1",
"description": "Build Scripts",
"main": "NA",
"scripts": {
"test": "jest"
},
"repository": {
"type": "git",
"url": "git+https://github.com/freeCodeCamp/freeCodeCamp.git"
},
"author": "freeCodeCamp.org",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/freeCodeCamp/freeCodeCamp/issues"
},
"homepage": "https://github.com/freeCodeCamp/freeCodeCamp#readme",
"devDependencies": {
"debug": "^4.0.1",
"dotenv": "^6.0.0",
"jest": "^24.8.0"
}
}

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
pushd "$TRAVIS_BUILD_DIR"
if [ -n "$DOCKER_PUSH_API_TOKEN" ]
then
git clone https://github.com/"$DOCKER_PUSH_REPO".git docker-push-repo
cd docker-push-repo
git submodule update --init --remote --recursive
git submodule status
git add freecodecamp
git -c user.name="$DOCKER_PUSH_USER" -c user.email='travis' \
commit -m 'chore(ci): Travis CI - bump submodule'
git push https://"$DOCKER_PUSH_USER":"$DOCKER_PUSH_API_TOKEN"@github.com/"$DOCKER_PUSH_REPO".git master
fi
popd

View File

@ -1,8 +1,9 @@
{
"name": "@freecodecamp/database-seeding",
"name": "@freecodecamp/scripts-seed",
"private": true,
"version": "0.0.1",
"description": "A script to seed challenges in to the database",
"main": "seedChallenges.js",
"description": "Database seed scripts",
"main": "NA",
"scripts": {
"test": "jest"
},