Skip to content

Commit 8324cf0

Browse files
authored
fix: Firefox installation script version string comparisons (cypress-io#1446)
1 parent 33b2f6a commit 8324cf0

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

factory/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NODE_VERSION="${FACTORY_DEFAULT_NODE_VERSION}"
1818

1919
# Update the FACTORY_VERSION to deploy cypress/factory if you make changes to
2020
# BASE_IMAGE, FACTORY_DEFAULT_NODE_VERSION, YARN_VERSION, factory.Dockerfile or installScripts
21-
FACTORY_VERSION='7.0.0'
21+
FACTORY_VERSION='7.0.1'
2222

2323
# Cypress officially supports the latest 3 major versions of Chrome, Firefox, and Edge only
2424

factory/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change log
22

3+
## 7.0.1
4+
5+
- Fixed Firefox installation script logic for Firefox versions > `999.x`. Addresses [#1443](https://github.com/cypress-io/cypress-docker-images/issues/1443).
6+
37
## 7.0.0
48

59
- Updated `FACTORY_DEFAULT_NODE_VERSION` from `22.21.0` (`Jod` - Maintenance LTS) to `24.11.0` (`Krypton` - Active LTS) - see [Blog v24.11.0](https://nodejs.org/en/blog/release/v24.11.0). Addressed in [#1439](https://github.com/cypress-io/cypress-docker-images/pull/1439).

factory/installScripts/firefox/install-firefox-version.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if (!firefoxVersion) {
77
console.log('No Firefox version provided, skipping Firefox install')
88
process.exit(0)
99
}
10+
const firefoxMajorVersion = firefoxVersion.split('.').map(Number)[0]
1011

1112
const architecture = process.arch
1213
let platformFilename
@@ -17,7 +18,7 @@ switch (architecture) {
1718
break
1819
case 'arm64':
1920
platformFilename = 'linux-aarch64'
20-
if (firefoxVersion >= '136.0') {
21+
if (firefoxMajorVersion >= 136) {
2122
break
2223
}
2324
else {
@@ -37,7 +38,7 @@ console.log(`Installing Firefox version ${firefoxVersion} for ${architecture}`)
3738

3839
let compression = 'bz2'
3940

40-
if (firefoxVersion >= '135.0') {
41+
if (firefoxMajorVersion >= 135) {
4142
compression = 'xz'
4243
}
4344

0 commit comments

Comments
 (0)