summaryrefslogtreecommitdiffstats
path: root/testing/resources/swift_hooks_repo
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/swift_hooks_repo')
-rw-r--r--testing/resources/swift_hooks_repo/.gitignore4
-rw-r--r--testing/resources/swift_hooks_repo/.pre-commit-hooks.yaml6
-rw-r--r--testing/resources/swift_hooks_repo/Package.swift7
-rw-r--r--testing/resources/swift_hooks_repo/Sources/swift_hooks_repo/main.swift1
4 files changed, 18 insertions, 0 deletions
diff --git a/testing/resources/swift_hooks_repo/.gitignore b/testing/resources/swift_hooks_repo/.gitignore
new file mode 100644
index 0000000..02c0875
--- /dev/null
+++ b/testing/resources/swift_hooks_repo/.gitignore
@@ -0,0 +1,4 @@
+.DS_Store
+/.build
+/Packages
+/*.xcodeproj
diff --git a/testing/resources/swift_hooks_repo/.pre-commit-hooks.yaml b/testing/resources/swift_hooks_repo/.pre-commit-hooks.yaml
new file mode 100644
index 0000000..c08df87
--- /dev/null
+++ b/testing/resources/swift_hooks_repo/.pre-commit-hooks.yaml
@@ -0,0 +1,6 @@
+- id: swift-hooks-repo
+ name: Swift hooks repo example
+ description: Runs the hello world app generated by swift package init --type executable (binary called swift_hooks_repo here)
+ entry: swift_hooks_repo
+ language: swift
+ files: \.(swift)$
diff --git a/testing/resources/swift_hooks_repo/Package.swift b/testing/resources/swift_hooks_repo/Package.swift
new file mode 100644
index 0000000..04976d3
--- /dev/null
+++ b/testing/resources/swift_hooks_repo/Package.swift
@@ -0,0 +1,7 @@
+// swift-tools-version:5.0
+import PackageDescription
+
+let package = Package(
+ name: "swift_hooks_repo",
+ targets: [.target(name: "swift_hooks_repo")]
+)
diff --git a/testing/resources/swift_hooks_repo/Sources/swift_hooks_repo/main.swift b/testing/resources/swift_hooks_repo/Sources/swift_hooks_repo/main.swift
new file mode 100644
index 0000000..f7cf60e
--- /dev/null
+++ b/testing/resources/swift_hooks_repo/Sources/swift_hooks_repo/main.swift
@@ -0,0 +1 @@
+print("Hello, world!")