Skip to content

Commit

Permalink
fix import path & use node child_process over execa
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyrohrbough committed Jan 27, 2023
1 parent 7e33096 commit 7dc830a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions scripts/semantic-commits/get-binary-release-data.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable no-console */
const execa = require('execa')
const childProcess = require('child_process')
const _ = require('lodash')
const { Octokit } = require('@octokit/core')

const { getCurrentReleaseData } = require('../get-current-release-data')
const { getCurrentReleaseData } = require('./get-current-release-data')
const { getNextVersionForBinary } = require('../get-next-version')
const { getLinkedIssues } = require('./get-linked-issues')

Expand All @@ -18,8 +18,8 @@ const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
* @param {string} latestReleaseInfo.commitDate - data of release
* @param {string} latestReleaseInfo.buildSha - git commit associated with published content
*/
const getChangedFilesSinceLastRelease = async (latestReleaseInfo) => {
const { stdout } = await execa('git', ['diff', `${latestReleaseInfo.buildSha}..`, '--name-only'])
const getChangedFilesSinceLastRelease = (latestReleaseInfo) => {
const stdout = childProcess.execSync(`git diff ${latestReleaseInfo.buildSha}.. --name-only`)

if (!stdout) {
console.log('no files changes since last release')
Expand Down
7 changes: 4 additions & 3 deletions scripts/semantic-commits/get-current-release-data.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* eslint-disable no-console */
const execa = require('execa')
const childProcess = require('child_process')

/**
* Get the version, commit date and git sha of the latest tag published on npm.
*/
const getCurrentReleaseData = async (verbose = true) => {
const getCurrentReleaseData = (verbose = true) => {
verbose && console.log('Get Current Release Information\n')
const { stdout } = await execa('npm', ['info', 'cypress', '--json'])

const stdout = childProcess.execSync('npm info cypress --json')
const npmInfo = JSON.parse(stdout)

const latestReleaseInfo = {
Expand Down

1 comment on commit 7dc830a

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 7dc830a Jan 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.2/linux-x64/emily/next-version-7dc830aad8251f3cee689c599b13077740db3b88/cypress.tgz

Please sign in to comment.