🚑️ fix ci
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-04-16 09:13:57 +02:00
parent 6e138a4c94
commit 316b2ac288
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -96,11 +96,23 @@ pub fn build(image: &str, ci: bool) {
"set -e".to_string(),
"pacman -Syu --noconfirm".to_string(),
"pacman -S --noconfirm rsync base-devel".to_string(),
"rsync -a /workdir/ /build/".to_string(),
];
if ci {
let symlink_cmd = format!(
"ln -s {} /build",
std::env::current_dir().unwrap().display()
);
docker_script.extend([symlink_cmd]);
} else {
docker_script.extend(["rsync -a /workdir/ /build/".to_string()]);
};
docker_script.extend([
"useradd -m build".to_string(),
"echo 'ALL ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers".to_string(),
"chown -R build /build".to_string(),
];
]);
if ci {
if std::fs::exists("./pacman.conf").unwrap() {