@@ -4,18 +4,20 @@ pub enum ArtifactType {
44 Rust ,
55 Scala ,
66 JavaMaven ,
7+ HaskellCabal ,
78 Custom {
89 pattern : & ' static str ,
910 name : & ' static str ,
1011 files : & ' static [ & ' static str ] ,
1112 } ,
1213}
1314
14- pub fn builtin ( ) -> [ ArtifactType ; 3 ] {
15+ pub fn builtin ( ) -> [ ArtifactType ; 4 ] {
1516 [
1617 ArtifactType :: Rust ,
1718 ArtifactType :: Scala ,
1819 ArtifactType :: JavaMaven ,
20+ ArtifactType :: HaskellCabal ,
1921 ]
2022}
2123
@@ -25,6 +27,7 @@ impl ArtifactType {
2527 ArtifactType :: Rust => "**/target" ,
2628 ArtifactType :: Scala => "**/target" ,
2729 ArtifactType :: JavaMaven => "**/target" ,
30+ ArtifactType :: HaskellCabal => "**/dist-newstyle" ,
2831 ArtifactType :: Custom { pattern, .. } => pattern,
2932 }
3033 }
@@ -34,6 +37,7 @@ impl ArtifactType {
3437 ArtifactType :: Rust => "Rust" ,
3538 ArtifactType :: Scala => "Scala" ,
3639 ArtifactType :: JavaMaven => "Java" ,
40+ ArtifactType :: HaskellCabal => "Haskell" ,
3741 ArtifactType :: Custom { name, .. } => name,
3842 }
3943 }
@@ -43,6 +47,7 @@ impl ArtifactType {
4347 ArtifactType :: Rust => vec ! [ "Cargo.toml" . to_string( ) ] ,
4448 ArtifactType :: Scala => vec ! [ "build.sbt" . to_string( ) ] ,
4549 ArtifactType :: JavaMaven => vec ! [ "pom.xml" . to_string( ) ] ,
50+ ArtifactType :: HaskellCabal => vec ! [ ] ,
4651 ArtifactType :: Custom { files, .. } => {
4752 files. iter ( ) . map ( |s| s. to_string ( ) ) . collect ( )
4853 }
0 commit comments