Skip to content

Commit

Permalink
chore: check (+ fix any typo/error) if all scripts works equally as o…
Browse files Browse the repository at this point in the history
…ld scripts
  • Loading branch information
alexgimenez02 committed Jul 5, 2023
1 parent b3b69d7 commit fafa08c
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 15 deletions.
8 changes: 4 additions & 4 deletions scripts/ci/bump-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ try {
process.exit(1)
}

const version = process.argv[2]
const phase = process.argv[3]

if (!phase) {
const version = process.argv[3]
const phase = process.argv[4]
if (!!phase) {
const PACKAGES_DIR: string = path.resolve(`${BIN_DIR}/../../packages`)

const packageInPackages = fs.readdirSync(PACKAGES_DIR)
const botonicPackages = packageInPackages.filter(function (file: string) {
return file.startsWith('botonic')
})
console.log(process.cwd())

botonicPackages.forEach(pkg => {
try {
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/bump-version.sh → scripts/ci/old/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ cd "$BIN_DIR/../.." || exit 1

cd packages || exit 1

VERSION=$1
PHASE=$2
VERSION=$2
PHASE=$3

update_botonic_deps (){
# $template $1
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions scripts/ci/prepare-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ botonicPackages.forEach(pkg => {
console.log(`Preparing ${pkg}...`)
console.log('====================================')
console.log('Cleaning...')
child_process.execSync('nice rm rf node_modules lib dist')
child_process.execSync('rm -rf node_modules lib dist', {
stdio: 'inherit',
})
console.log('Installing deps...')
child_process.execSync('nice npm i -D > /dev/null')
child_process.execSync('npm i -D > /dev/null', { stdio: 'inherit' })
console.log('Building...')
child_process.execSync('nice npm run build > /dev/null')
child_process.execSync('npm run build > /dev/null', { stdio: 'inherit' })
console.log('')
process.chdir('..')
})
Expand Down
14 changes: 9 additions & 5 deletions scripts/ci/upgrade-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,33 @@ try {
process.exit(1)
}

child_process.execSync('renice 10 $$ > /dev/null')
child_process.execSync(`renice 10 ${process.pid} > /dev/null`, {
stdio: 'inherit',
})

child_process.execSync('eslint_d stop > /dev/null')
child_process.execSync('eslint_d stop > /dev/null', { stdio: 'inherit' })

console.log('Upgrading common dev dependencies')
console.log('====================================')

child_process.execSync('npm i -D')
child_process.execSync('npm i -D', { stdio: 'inherit' })

const packagesDir = path.join(BIN_DIR, '/../../packages')
const packageInPackages = fs.readdirSync(packagesDir)
const botonicPackages = packageInPackages.filter(function (file: string) {
return file.startsWith('botonic')
})
process.chdir('packages')

botonicPackages.forEach(botonicPackage => {
process.chdir(botonicPackage)
console.log(`Upgrading ${botonicPackage} dependencies`)
console.log('====================================')
child_process.execSync(
'BOTONIC_NO_INSTALL_ROOT_DEPENDENCIES=1 npm i -D > /dev/null'
'BOTONIC_NO_INSTALL_ROOT_DEPENDENCIES=1 npm i -D > /dev/null',
{ stdio: 'inherit' }
)
process.chdir(packagesDir)
})

child_process.execSync('eslint_d start')
child_process.execSync('eslint_d start', { stdio: 'inherit' })
4 changes: 3 additions & 1 deletion scripts/qa/lint-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ try {
process.exit(1)
}

const lintProcess = child_process.spawnSync('npm', ['run', 'lint'])
const lintProcess = child_process.spawnSync('npm', ['run', 'lint'], {
stdio: 'inherit',
})

if (lintProcess.error) {
console.error(`Failed to execute lint command: ${lintProcess.error}`)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fafa08c

Please sign in to comment.