fix(deploy): misc. re-arrange scripts and organize
This commit is contained in:
committed by
mrugesh
parent
a6afaf1eb6
commit
c5fd478d9a
@ -29,8 +29,3 @@ jobs:
|
|||||||
- stage: Unit and Integration tests
|
- stage: Unit and Integration tests
|
||||||
script: npm test
|
script: npm test
|
||||||
|
|
||||||
- stage: Artifacts builds
|
|
||||||
if: branch = master && type != pull_request
|
|
||||||
script: bash tools/scripts/builds/trigger-build.sh
|
|
||||||
install: skip
|
|
||||||
before_script: skip
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/api-server",
|
"name": "@freecodecamp/api-server",
|
||||||
"version": "0.1.0",
|
"private": true,
|
||||||
|
"version": "0.0.1",
|
||||||
"repository": "freecodecamp/freecodecamp",
|
"repository": "freecodecamp/freecodecamp",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "development-entry.js",
|
"main": "development-entry.js",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/client",
|
"name": "@freecodecamp/client",
|
||||||
|
"private": true,
|
||||||
"description": "The freeCodeCamp web client",
|
"description": "The freeCodeCamp web client",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"author": "freeCodeCamp <team@freecodecamp.org>",
|
"author": "freeCodeCamp <team@freecodecamp.org>",
|
||||||
@ -76,7 +77,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "gatsby clean",
|
"clean": "gatsby clean",
|
||||||
"prebuild": "npm run build:workers && node ../tools/scripts/ensure-env.js",
|
"prebuild": "npm run build:workers && node ../tools/scripts/build/ensure-env.js",
|
||||||
"build": "node --max_old_space_size=7168 node_modules/gatsby-cli build",
|
"build": "node --max_old_space_size=7168 node_modules/gatsby-cli build",
|
||||||
"build:workers": "node --max_old_space_size=7168 node_modules/webpack-cli --env.production --config ./webpack-workers.js --progress",
|
"build:workers": "node --max_old_space_size=7168 node_modules/webpack-cli --env.production --config ./webpack-workers.js --progress",
|
||||||
"predevelop": "npm run prebuild",
|
"predevelop": "npm run prebuild",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fcc-create-nav-data",
|
"name": "fcc-create-nav-data",
|
||||||
|
"private": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha -R spec \"./{,!(node_modules)/**/}*.test.js\"",
|
"test": "mocha -R spec \"./{,!(node_modules)/**/}*.test.js\"",
|
||||||
|
@ -1 +1,5 @@
|
|||||||
{"name": "fcc-source-challenges"}
|
{
|
||||||
|
"name": "fcc-source-challenges",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "gatsby-remark-fcc-forum-emoji",
|
"name": "gatsby-remark-fcc-forum-emoji",
|
||||||
"description": "A plugin to help fix the styling of forum emoji in the Guide",
|
"private": true,
|
||||||
"main": "index.js"
|
"version": "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -1 +1,5 @@
|
|||||||
{"name": "gatsby-plugin-node-identity", "version": "0.1.0"}
|
{
|
||||||
|
"name": "gatsby-plugin-node-identity",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.1"
|
||||||
|
}
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"curriculum",
|
"curriculum",
|
||||||
"search-indexing",
|
"search-indexing",
|
||||||
"tools/challenge-md-parser",
|
"tools/challenge-md-parser",
|
||||||
"tools/scripts/seed"
|
"tools/scripts/seed",
|
||||||
|
"tools/scripts/build"
|
||||||
],
|
],
|
||||||
"version": "independent"
|
"version": "independent"
|
||||||
}
|
}
|
||||||
|
10
package.json
10
package.json
@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/freecodecamp",
|
"name": "@freecodecamp/freecodecamp",
|
||||||
|
"private": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"bootstrap": "lerna bootstrap --ci",
|
"bootstrap": "lerna bootstrap --ci",
|
||||||
"clean": "npm-run-all clean:client clean:all-deps",
|
"clean": "npm-run-all clean:gatsby-site clean:packages",
|
||||||
"clean:all-deps": "lerna clean && shx rm -rf node_modules",
|
"clean:root-deps": "shx rm -rf node_modules",
|
||||||
"clean:client": "cd ./client && npm run clean",
|
"clean:packages": "lerna clean -y",
|
||||||
|
"clean:gatsby-site": "cd ./client && npm run clean",
|
||||||
"develop": "npm-run-all ensure-env -p develop:*",
|
"develop": "npm-run-all ensure-env -p develop:*",
|
||||||
"develop:client": "cd ./client && npm run develop",
|
"develop:client": "cd ./client && npm run develop",
|
||||||
"develop:server": "cd ./api-server && npm run develop",
|
"develop:server": "cd ./api-server && npm run develop",
|
||||||
@ -16,7 +18,7 @@
|
|||||||
"docker:seed": "docker-compose run --rm freecodecamp npm run seed",
|
"docker:seed": "docker-compose run --rm freecodecamp npm run seed",
|
||||||
"docker:test": "docker-compose -f docker-compose.tests.yml run --rm tests bash",
|
"docker:test": "docker-compose -f docker-compose.tests.yml run --rm tests bash",
|
||||||
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
|
"docker:test:init": "docker-compose -f docker-compose.tests.yml run -u root --rm tests bash change_volumes_owner.sh",
|
||||||
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/ensure-env.js",
|
"ensure-env": "cross-env DEBUG=fcc:* node ./tools/scripts/build/ensure-env.js",
|
||||||
"format": "npm run lint -- --fix",
|
"format": "npm run lint -- --fix",
|
||||||
"hooks:install": "node node_modules/husky/husky.js install",
|
"hooks:install": "node node_modules/husky/husky.js install",
|
||||||
"hooks:uninstall": "node node_modules/husky/husky.js uninstall",
|
"hooks:uninstall": "node node_modules/husky/husky.js uninstall",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/search-indexing",
|
"name": "@freecodecamp/search-indexing",
|
||||||
|
"private": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "A repository to hold all of our search assets",
|
"description": "A repository to hold all of our search assets",
|
||||||
"main": "N/A",
|
"main": "N/A",
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/challenge-md-parser",
|
"name": "@freecodecamp/challenge-md-parser",
|
||||||
"version": "1.0.0",
|
"private": true,
|
||||||
|
"version": "0.0.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
@ -2,10 +2,10 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const debug = require('debug');
|
const debug = require('debug');
|
||||||
|
|
||||||
const env = require('../../config/env');
|
const env = require('../../../config/env');
|
||||||
|
|
||||||
const { getChallengesForLang } = require('../../curriculum/getChallenges');
|
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
|
||||||
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
|
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
|
||||||
|
|
||||||
const { createRedirects } = require('./createRedirects');
|
const { createRedirects } = require('./createRedirects');
|
||||||
|
|
||||||
@ -20,10 +20,10 @@ const {
|
|||||||
newsLocation: news
|
newsLocation: news
|
||||||
} = env;
|
} = env;
|
||||||
|
|
||||||
const apiPath = path.resolve(__dirname, '../../api-server');
|
const apiPath = path.resolve(__dirname, '../../../api-server');
|
||||||
const clientPath = path.resolve(__dirname, '../../client');
|
const clientPath = path.resolve(__dirname, '../../../client');
|
||||||
const clientStaticPath = path.resolve(clientPath, 'static');
|
const clientStaticPath = path.resolve(clientPath, 'static');
|
||||||
const globalConfigPath = path.resolve(__dirname, '../../config');
|
const globalConfigPath = path.resolve(__dirname, '../../../config');
|
||||||
|
|
||||||
if (NODE_ENV === 'production') {
|
if (NODE_ENV === 'production') {
|
||||||
const redirects = createRedirects({ api, news, forum });
|
const redirects = createRedirects({ api, news, forum });
|
@ -2,8 +2,8 @@ const fs = require('fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const debug = require('debug');
|
const debug = require('debug');
|
||||||
|
|
||||||
const { getChallengesForLang } = require('../../curriculum/getChallenges');
|
const { getChallengesForLang } = require('../../../curriculum/getChallenges');
|
||||||
const { createPathMigrationMap } = require('./seed/createPathMigrationMap');
|
const { createPathMigrationMap } = require('../seed/createPathMigrationMap');
|
||||||
|
|
||||||
const log = debug('fcc:tools:ensure-env');
|
const log = debug('fcc:tools:ensure-env');
|
||||||
|
|
4966
tools/scripts/build/package-lock.json
generated
Normal file
4966
tools/scripts/build/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
25
tools/scripts/build/package.json
Normal file
25
tools/scripts/build/package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
|
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@freecodecamp/database-seeding",
|
"name": "@freecodecamp/scripts-seed",
|
||||||
|
"private": true,
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "A script to seed challenges in to the database",
|
"description": "Database seed scripts",
|
||||||
"main": "seedChallenges.js",
|
"main": "NA",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user