Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use chromium instead of a manual chrome download #178

Merged
merged 15 commits into from
Sep 17, 2024
92 changes: 51 additions & 41 deletions rules/chrome.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,82 @@
{
"patterns": [
"\\bchrome\\b"
"\\bchrome\\b",
"\\bchromium\\b"
],
"dependencies": [
{
"pre_install": [],
"packages": ["chromium-browser"],
"post_install": [],
"constraints": [
{
"os": "linux",
"distribution": "ubuntu",
"versions": ["20.04", "22.04"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Ubuntu 24.04 supported?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Good catch, I lost it in the refactoring as starting with 24.04, the key is chromium instead of chromium-browser. Added it.

}
]
},
{
"pre_install": [
{ "command": "[ $(which google-chrome) ] || apt-get install -y gnupg curl" },
{ "command": "[ $(which google-chrome) ] || curl -fsSL -o /tmp/google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" },
{ "command": "[ $(which google-chrome) ] || DEBIAN_FRONTEND='noninteractive' apt-get install -y /tmp/google-chrome.deb" }
],
"packages": [],
"post_install": [
{ "command": "rm -f /tmp/google-chrome.deb" }
{ "command": "dnf install -y dnf-plugins-core" },
{ "command": "dnf config-manager --set-enabled crb" },
{ "command": "dnf install -y epel-release" }
],
"packages": ["chromium"],
"post_install": [],
"constraints": [
{
"os": "linux",
"distribution": "ubuntu"
},
"distribution": "rockylinux"
}
]
},
{
"pre_install": [
{ "command": "subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms" },
{ "command": "dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm" }
],
"packages": ["chromium"],
"post_install": [],
"constraints": [
{
"os": "linux",
"distribution": "debian"
"distribution": "redhat",
"versions": ["8"]
}
]
},
{
"pre_install": [
{ "command": "yum install -y which" },
{ "command": "[ $(which google-chrome) ] || curl -fsSL -o /tmp/google-chrome.rpm https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm" },
{ "command": "[ $(which google-chrome) ] || yum install -y /tmp/google-chrome.rpm" }
],
"packages": [],
"post_install": [
{ "command": "rm -f /tmp/google-chrome.rpm" }
{ "command": "subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms" },
{ "command": "dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm" }
],
"packages": ["chromium"],
"post_install": [],
"constraints": [
{
"os": "linux",
"distribution": "centos",
"versions": ["8"]
},
"distribution": "redhat",
"versions": ["9"]
}
]
},
{
"pre_install": [],
"packages": ["chromium"],
"post_install": [],
"constraints": [
{
"os": "linux",
"distribution": "rockylinux"
"distribution": "debian"
},
{
"os": "linux",
"distribution": "redhat",
"versions": ["8"]
"distribution": "fedora"
},
{
"os": "linux",
"distribution": "fedora",
"versions": [ "36", "37" ]
"distribution": "alpine"
}
]
},
Expand All @@ -70,21 +94,7 @@
{
"os": "linux",
"distribution": "centos",
"versions": ["7"]
},
{
"os": "linux",
"distribution": "redhat",
"versions": ["7"]
}
]
},
{
"packages": ["chromium"],
"constraints": [
{
"os": "linux",
"distribution": "alpine"
"versions": ["7", "8"]
}
]
}
Expand Down
Loading