mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-04 19:56:36 +08:00
fetch-changed: skip prefix and diff only incoming changes
This commit is contained in:
parent
ad20e03eeb
commit
4efbf3bd0d
@ -91,7 +91,7 @@ else
|
||||
endif
|
||||
|
||||
# Invoke fetch for one or more targets separated by comma
|
||||
f.%: prefix $(FSTOOLS_TAG) FORCE
|
||||
f.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
|
||||
@ -4,7 +4,7 @@ set -e
|
||||
|
||||
git fetch origin master
|
||||
packages=""
|
||||
for toml in $(git diff --name-only origin/master | grep '/recipe.toml$' | sort | uniq)
|
||||
for toml in $(git diff --name-only origin/master... | grep '/recipe.toml$' | sort | uniq)
|
||||
do
|
||||
package="$(basename "$(dirname "${toml}")")"
|
||||
if [ -n "${packages}" ]
|
||||
|
||||
@ -653,6 +653,10 @@ pub(crate) fn fetch_cargo(
|
||||
cargopath: Option<&String>,
|
||||
logger: &PtyOut,
|
||||
) -> Result<()> {
|
||||
if !check_toolchain_available() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut source_dir = source_dir.clone();
|
||||
if let Some(cargopath) = cargopath {
|
||||
source_dir = source_dir.join(cargopath);
|
||||
@ -674,6 +678,14 @@ pub(crate) fn fetch_cargo(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Check if "REDOXER_TOOLCHAIN" is available.
|
||||
fn check_toolchain_available() -> bool {
|
||||
let Ok(dir) = std::env::var("REDOXER_TOOLCHAIN") else {
|
||||
return false;
|
||||
};
|
||||
PathBuf::from(dir).is_dir()
|
||||
}
|
||||
|
||||
pub fn fetch_remote(
|
||||
recipe_dir: &Path,
|
||||
recipe: &CookRecipe,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user