Skip to content

Commit

Permalink
Merge pull request #204 from Screenly/feature/ignore_instance
Browse files Browse the repository at this point in the history
Adds: instance.yml to ignore list
  • Loading branch information
korvyashka authored Aug 12, 2024
2 parents 6450454 + a0e42f2 commit 30d0e31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/commands/edge_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ impl EdgeAppCommand {
app_id
),
)?;
// TODO: Backend will need to support entrypoint types

let versions: Vec<EdgeAppVersion> =
serde_json::from_value::<Vec<EdgeAppVersion>>(response)?;
Expand Down Expand Up @@ -1293,7 +1292,6 @@ impl EdgeAppCommand {
manifest: &EdgeAppManifest,
) -> Result<bool, CommandError> {
let version = self.get_latest_revision(app_id)?;
// TODO: implement entrypoint changes on the backend
match version {
Some(_version) => Ok(_version
!= EdgeAppVersion {
Expand Down
6 changes: 5 additions & 1 deletion src/commands/edge_app_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl FileChanges {
}

fn is_included(entry: &DirEntry, ignore: &Ignorer) -> bool {
let exclusion_list = ["screenly.js", "screenly.yml", ".ignore"];
let exclusion_list = ["screenly.js", "screenly.yml", ".ignore", "instance.yml"];
if exclusion_list.contains(&entry.file_name().to_str().unwrap_or_default()) {
return false;
}
Expand Down Expand Up @@ -657,6 +657,10 @@ mod tests {
.unwrap()
.write_all(b"file2.txt")
.unwrap();
File::create(dir_path.join("instance.yml"))
.unwrap()
.write_all(b"id: 01H2QZ6Z8WXWNDC0KQ198XCZEB\nname: test\n")
.unwrap();

let result = collect_paths_for_upload(dir_path).unwrap();
assert_eq!(result.len(), 1);
Expand Down

0 comments on commit 30d0e31

Please sign in to comment.