Skip to content

Commit

Permalink
Rename folder from release to postbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Feb 16, 2022
1 parent fedcd29 commit b08cb95
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/dnb-design-system-portal/scripts/version.js
Expand Up @@ -8,7 +8,7 @@ const path = require('path')
const { isCI } = require('ci-info')
const {
getNextReleaseVersion,
} = require('@dnb/eufemia/scripts/release/getNextReleaseVersion')
} = require('@dnb/eufemia/scripts/postbuild/getNextReleaseVersion')

const init = async () => {
if (!isCI) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dnb-eufemia/jest.config.js
Expand Up @@ -4,7 +4,7 @@ const config = {
testRegex: '(/__tests__/\\.js|(\\.|/)(test|spec))\\.(js|jsx|ts|tsx)?$',
modulePathIgnorePatterns: [
'not_in_use',
'<rootDir>/scripts/release/*',
'<rootDir>/scripts/postbuild/*',
'<rootDir>/build/',
'<rootDir>/assets/',
'<rootDir>/stories/',
Expand Down
16 changes: 8 additions & 8 deletions packages/dnb-eufemia/package.json
Expand Up @@ -22,12 +22,12 @@
"build": "./scripts/prebuild/local-prebuild.sh",
"prebuild:ci": "yarn build:prebuild",
"build:ci": "yarn prebuild:ci && yarn postbuild:ci && yarn publish:prepare",
"postbuild:ci": "./scripts/release/postbuild.sh",
"build:cjs": "./scripts/release/babel-cjs.sh",
"postbuild:ci": "./scripts/postbuild/postbuild.sh",
"build:cjs": "./scripts/postbuild/babel-cjs.sh",
"build:clean": "rm -rf build/**",
"build:copy": "./scripts/release/copy-build-artifacts.sh",
"build:es": "./scripts/release/babel-es.sh",
"build:esm": "./scripts/release/babel-esm.sh",
"build:copy": "./scripts/postbuild/copy-build-artifacts.sh",
"build:es": "./scripts/postbuild/babel-es.sh",
"build:esm": "./scripts/postbuild/babel-esm.sh",
"prebuild:figma:ci": "yarn figma",
"postbuild:figma:ci": "yarn test:update && yarn test:screenshots:update && babel-node ./scripts/figma/tasks/commitChanges",
"build:pack": "yarn build && yarn publish:prepare && cd ./build && yarn pack",
Expand All @@ -37,7 +37,7 @@
"build:types:definitions": "yarn tsc --project tsconfig.definitions.json",
"build:types:dev": "nodemon --exec 'babel-node ./scripts/prebuild/generateTypes.js' --ext js --watch './src/**/*' --watch './scripts/**/*'",
"build:types:esm": "yarn tsc --project tsconfig.definitions.json --declarationDir ./build/esm --rootDir src",
"build:umd": "./scripts/release/babel-umd.sh",
"build:umd": "./scripts/postbuild/babel-umd.sh",
"precommit": "yarn lint-staged",
"dev:icons": "nodemon --exec 'babel-node ./scripts/tools/convertIcons' --ignore '/icons/**' --ignore '*.json'",
"dev:resources": "nodemon --exec 'babel-node ./scripts/prebuild/resources/makeResourcesPackage.js' --ext js,html,json,css,scss --watch './build/style/**/*' --watch './scripts/**/*' --ignore '*.json'",
Expand All @@ -59,9 +59,9 @@
"lint:styles": "stylelint './src/**/*.{js,scss}'",
"lint:styles:staged": "stylelint './{src,scripts}/**/*.{js,scss}'",
"make-properties": "babel-node ./scripts/prebuild/makeProperties",
"publish:ci": "yarn publish:prepare && ./scripts/release/publish-release.sh",
"publish:ci": "yarn publish:prepare && ./scripts/postbuild/publish-release.sh",
"publish:dry": "dotenv semantic-release --no-ci --dry-run",
"publish:prepare": "./scripts/release/publish-prepare.sh",
"publish:prepare": "./scripts/postbuild/publish-prepare.sh",
"reset": "rm -rf ./node_modules ./components ./elements ./es ./icons ./extensions ./shared ./style ./umd",
"skeleton:font": "nodemon --exec 'babel-node ./scripts/tools/createSkeletonFont.js'",
"start": "start-storybook -s / -p 8002 --ci --no-release-notes --no-version-updates",
Expand Down
Expand Up @@ -19,8 +19,8 @@ echo 'Building cjs bundle done!'

echo 'Copy additional files to cjs ...'

OUT_DIR=./build/cjs babel-node ./scripts/release/copyTypeScriptFiles.js
OUT_DIR=./build/cjs babel-node ./scripts/release/copyStyles.js
OUT_DIR=./build/cjs babel-node ./scripts/postbuild/copyTypeScriptFiles.js
OUT_DIR=./build/cjs babel-node ./scripts/postbuild/copyStyles.js

echo 'Copy extra cjs package.json ...'

Expand Down
Expand Up @@ -19,5 +19,5 @@ echo 'Building es bundle done!'

echo 'Copy additional files to es ...'

OUT_DIR=./build/es babel-node ./scripts/release/copyTypeScriptFiles.js
OUT_DIR=./build/es babel-node ./scripts/release/copyStyles.js
OUT_DIR=./build/es babel-node ./scripts/postbuild/copyTypeScriptFiles.js
OUT_DIR=./build/es babel-node ./scripts/postbuild/copyStyles.js
Expand Up @@ -19,5 +19,5 @@ echo 'Building esm bundle done!'

echo 'Copy additional files to esm ...'

OUT_DIR=./build/esm babel-node ./scripts/release/copyTypeScriptFiles.js
OUT_DIR=./build/esm babel-node ./scripts/release/copyStyles.js
OUT_DIR=./build/esm babel-node ./scripts/postbuild/copyTypeScriptFiles.js
OUT_DIR=./build/esm babel-node ./scripts/postbuild/copyStyles.js
Expand Up @@ -8,6 +8,6 @@ rm -rf build/**/{__tests__,cjs}
cp -r ./assets/ ./build/assets
cp .npmignore ./build/.npmignore
cp README README.md LICENSE ./build
babel-node ./scripts/release/copyFinaleBuild.js
babel-node ./scripts/postbuild/copyFinaleBuild.js

echo 'Copy build artifacts done!'
Expand Up @@ -4,8 +4,8 @@
*/

// When on a "release" branch:
// run: yarn nodemon --exec 'babel-node ./scripts/release/getNextReleaseVersion.js' --ext js --watch './scripts/**/*'
// run (mjs): yarn nodemon --exec 'node --experimental-import-meta-resolve ./scripts/release/getNextReleaseVersion.mjs' --ext mjs --watch './scripts/**/*'
// run: yarn nodemon --exec 'babel-node ./scripts/postbuild/getNextReleaseVersion.js' --ext js --watch './scripts/**/*'
// run (mjs): yarn nodemon --exec 'node --experimental-import-meta-resolve ./scripts/postbuild/getNextReleaseVersion.mjs' --ext mjs --watch './scripts/**/*'

const { exec } = require('child_process')
const getBranchName = require('current-git-branch')
Expand Down
Expand Up @@ -15,6 +15,6 @@ yarn prettier:other

echo 'Testing the postbuild ...'

jest --ci --rootDir ./scripts/release ./postbuild.test.js
jest --ci --rootDir ./scripts/postbuild ./postbuild.test.js

echo 'Postbuild done!'
Expand Up @@ -4,10 +4,10 @@ set -e # Exit immediately if a command exits with a non-zero status.

echo 'Prepare before publish has started ...'

babel-node ./scripts/release/prepareForRelease.js
babel-node ./scripts/postbuild/prepareForRelease.js

echo 'Testing the postbuild before publish ...'

jest --ci --rootDir ./scripts/release ./prepareForRelease.test.js
jest --ci --rootDir ./scripts/postbuild ./prepareForRelease.test.js

echo 'Prepare before publish is done!'
Expand Up @@ -6,11 +6,11 @@
import fs from 'fs-extra'
import { makeReleaseVersion } from '../makeReleaseVersion'
import * as getBranchName from 'current-git-branch'
import * as getNextReleaseVersion from '../../../release/getNextReleaseVersion'
import * as getNextReleaseVersion from '../../../postbuild/getNextReleaseVersion'

jest.mock('../../../release/getNextReleaseVersion', () => {
jest.mock('../../../postbuild/getNextReleaseVersion', () => {
return {
...jest.requireActual('../../../release/getNextReleaseVersion'),
...jest.requireActual('../../../postbuild/getNextReleaseVersion'),
getNextReleaseVersion: jest.fn().mockResolvedValue(),
}
})
Expand Down
Expand Up @@ -9,7 +9,7 @@ import getBranchName from 'current-git-branch'
import {
getNextReleaseVersion,
releaseBranches,
} from '../../release/getNextReleaseVersion'
} from '../../postbuild/getNextReleaseVersion'

export async function makeReleaseVersion() {
const branchName = getBranchName()
Expand Down

0 comments on commit b08cb95

Please sign in to comment.