Skip to content

Commit 7eb2f3c

Browse files
Merge pull request #1033 from apollographql/add/docgen_script
Rename SwiftScript folder, add stub for doc generator
2 parents 8bcb3c6 + 9ef1cf8 commit 7eb2f3c

12 files changed

Lines changed: 19 additions & 13 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ node_modules/
5555
package-lock.json
5656
scripts/apollo
5757
scripts/apollo.tar.gz
58-
Codegen/ApolloCLI
58+
SwiftScripts/ApolloCLI

Apollo.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,7 @@
16191619
);
16201620
runOnlyForDeploymentPostprocessing = 0;
16211621
shellPath = /bin/sh;
1622-
shellScript = "cd \"${SRCROOT}/Codegen\"\nswift run Codegen -t \"GitHub\"\n";
1622+
shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nswift run Codegen -t \"GitHub\"\n";
16231623
};
16241624
9FCE2D061E6C251100E34457 /* Generate Apollo Client API */ = {
16251625
isa = PBXShellScriptBuildPhase;
@@ -1633,7 +1633,7 @@
16331633
);
16341634
runOnlyForDeploymentPostprocessing = 0;
16351635
shellPath = /bin/sh;
1636-
shellScript = "cd \"${SRCROOT}/Codegen\"\nswift run Codegen -t \"StarWars\"\n";
1636+
shellScript = "cd \"${SRCROOT}/SwiftScripts\"\nswift run Codegen -t \"StarWars\"\n";
16371637
showEnvVarsInLog = 0;
16381638
};
16391639
/* End PBXShellScriptBuildPhase section */
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ let package = Package(
77
name: "Codegen",
88
dependencies: [
99
.package(path: ".."),
10-
.package(url: "https://github.com/apple/swift-tools-support-core", from: "0.0.1")
10+
.package(url: "https://github.com/apple/swift-tools-support-core", from: "0.0.1"),
1111
],
1212
targets: [
1313
.target(
1414
name: "Codegen",
1515
dependencies: ["ApolloCodegenLib", "SwiftToolsSupport-auto"]),
1616
.target(name: "SchemaDownload",
1717
dependencies: ["ApolloCodegenLib"]),
18+
.target(name: "DocumentationGenerator",
19+
dependencies: []),
1820
.testTarget(
1921
name: "CodegenTests",
2022
dependencies: ["Codegen"]),
File renamed without changes.
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let parentFolderOfScriptFile = FileFinder.findParentFolder()
88
// Use that to calculate the source root
99
let sourceRootURL = parentFolderOfScriptFile
1010
.deletingLastPathComponent() // Sources
11-
.deletingLastPathComponent() // Codegen
11+
.deletingLastPathComponent() // SwiftScripts
1212
.deletingLastPathComponent() // apollo-ios
1313

1414
// In a typical app, you'll only need to do this for one target, so you'd
@@ -25,7 +25,7 @@ try FileManager.default.apollo_createFolderIfNeeded(at: targetURL)
2525

2626
// Calculate where you want to download the CLI folder.
2727
let cliFolderURL = sourceRootURL
28-
.appendingPathComponent("Codegen")
28+
.appendingPathComponent("SwiftScripts")
2929
.appendingPathComponent("ApolloCLI")
3030

3131
do {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import Foundation
2+
3+
// TODO: Create this when I can import Sourcedocs as a library.
4+

Codegen/Sources/SchemaDownload/main.swift renamed to SwiftScripts/Sources/SchemaDownload/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ let parentFolderOfScriptFile = FileFinder.findParentFolder()
77
// Use that to calculate the source root
88
let sourceRootURL = parentFolderOfScriptFile
99
.deletingLastPathComponent() // Sources
10-
.deletingLastPathComponent() // Codegen
10+
.deletingLastPathComponent() // SwiftScripts
1111
.deletingLastPathComponent() // apollo-ios
1212

1313
let cliFolderURL = sourceRootURL
14-
.appendingPathComponent("Codegen")
14+
.appendingPathComponent("SwiftScripts")
1515
.appendingPathComponent("ApolloCLI")
1616

1717
let endpoint = URL(string: "http://localhost:8080/graphql")!

0 commit comments

Comments
 (0)