Skip to content

Commit

Permalink
chore: fix "cannot find module" in clone-repo-and-checkout-release-br…
Browse files Browse the repository at this point in the history
…anch (#20293)
  • Loading branch information
flotwig committed Feb 25, 2022
1 parent 3d50292 commit 95700ae
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
18 changes: 12 additions & 6 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mainBuildFilters: &mainBuildFilters
only:
- develop
- 10.0-release
- fix-cache-state
- fix-next-version-in-test-repos

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -38,7 +38,7 @@ macWorkflowFilters: &mac-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ fix-cache-state, << pipeline.git.branch >> ]
- equal: [ fix-next-version-in-test-repos, << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -48,7 +48,7 @@ windowsWorkflowFilters: &windows-workflow-filters
or:
- equal: [ master, << pipeline.git.branch >> ]
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ fix-cache-state, << pipeline.git.branch >> ]
- equal: [ fix-next-version-in-test-repos, << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -586,10 +586,16 @@ commands:
steps:
- restore_cached_binary
- run:
name: "Cloning test project: <<parameters.repo>>"
name: "Cloning test project and checking out release branch: <<parameters.repo>>"
working_directory: ~/
command: |
git clone --depth 1 --no-single-branch https://github.com/cypress-io/<<parameters.repo>>.git /tmp/<<parameters.repo>>
cd /tmp/<<parameters.repo>> && (git checkout $(node ./scripts/get-next-version.js) || true)
# install some deps for get-next-version
npm i [email protected] [email protected] [email protected]
NEXT_VERSION=$(node ./cypress/scripts/get-next-version.js)
cd /tmp/<<parameters.repo>> && (git checkout $NEXT_VERSION || true)
test-binary-against-rwa:
description: |
Expand Down Expand Up @@ -1626,7 +1632,7 @@ jobs:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "fix-cache-state" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "fix-next-version-in-test-repos" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down
22 changes: 13 additions & 9 deletions scripts/get-next-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

// See ../guides/next-version.md for documentation.

const path = require('path')
const semver = require('semver')
const Bluebird = require('bluebird')
const bumpCb = require('conventional-recommended-bump')
const { promisify } = require('util')

const currentVersion = require('../package.json').version

const bump = Bluebird.promisify(bumpCb)
const bump = promisify(bumpCb)
const paths = ['packages', 'cli']

let nextVersion
Expand All @@ -30,14 +31,17 @@ if (require.main !== module) {
return
}

Bluebird.mapSeries(paths, async (path) => {
const pathNextVersion = await getNextVersionForPath(path)
(async () => {
process.chdir(path.join(__dirname, '..'))

if (!nextVersion || semver.gt(pathNextVersion, nextVersion)) {
nextVersion = pathNextVersion
for (const path of paths) {
const pathNextVersion = await getNextVersionForPath(path)

if (!nextVersion || semver.gt(pathNextVersion, nextVersion)) {
nextVersion = pathNextVersion
}
}
})
.then(() => {

if (!nextVersion) {
throw new Error('Unable to determine next version.')
}
Expand All @@ -51,4 +55,4 @@ Bluebird.mapSeries(paths, async (path) => {
}

console.log(nextVersion)
})
})()

3 comments on commit 95700ae

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 95700ae Feb 25, 2022

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 platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.5.1/linux-x64/circle-develop-95700aed467b9336e768a757f8a9937a7c43c2c2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 95700ae Feb 25, 2022

Choose a reason for hiding this comment

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

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

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.5.1/win32-x64/circle-develop-95700aed467b9336e768a757f8a9937a7c43c2c2/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 95700ae Feb 25, 2022

Choose a reason for hiding this comment

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

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

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/9.5.1/darwin-x64/circle-develop-95700aed467b9336e768a757f8a9937a7c43c2c2/cypress.tgz

Please sign in to comment.