From 25d0504d5ad4c096150b3a887d3b16bf21320d19 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Thu, 6 Sep 2018 14:01:08 -0500 Subject: [PATCH 01/16] Redriect to Ether/ directory to remove executables in publishing script --- publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/publish.sh b/publish.sh index 2b9db7d..90de0ea 100644 --- a/publish.sh +++ b/publish.sh @@ -66,8 +66,9 @@ git add . git commit -S -m "Updated Ether version to $TAG" git push origin master cd ../ - rm -rf homebrew-tap + +cd Ether/ rm -rf macOS-sierra.tar.gz rm -rf $PACKAGE_NAME rm install From e0d88934a31e967ee070fb9a105ab10f9aec47d6 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:16:11 -0500 Subject: [PATCH 02/16] Created 'new-commit' config key --- Sources/Ether/Configuration.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/Ether/Configuration.swift b/Sources/Ether/Configuration.swift index 4bd4320..455887c 100644 --- a/Sources/Ether/Configuration.swift +++ b/Sources/Ether/Configuration.swift @@ -34,7 +34,8 @@ public class Configuration: Command { "Valid keys are:", "- access-token: The GitHub access token to use for interacting the the GraphQL API. You can create on at https://github.com/settings/token", "- install-commit: The commit message to use on package install. Use '&0' as package name placeholder", - "- remove-commit: The commit message to use on when a package is removed. Use '&0' as package name placeholder", + "- remove-commit: The commit message to use when a package is removed. Use '&0' as package name placeholder", + "- new-commit: The commit message to use when a new project is generated. Use '&0' as the project name placeholder", "- signed-commits: If set to a truthy value (true, yes, y, 1), auto-commits will pass in the '-S' flag" ]), CommandArgument.argument(name: "value", help: ["The new value for the key passed in. If no value is passed in, the key will be removed from the config"]) @@ -112,12 +113,14 @@ public struct Config: Codable, Reflectable { public var accessToken: String? public var installCommit: String? public var removeCommit: String? + public var newCommit: String? public var signedCommits: String? static let properties: [String: WritableKeyPath] = [ "access-token": \.accessToken, "install-commit": \.installCommit, "remove-commit": \.removeCommit, + "new-commit": \.newCommit, "signed-commits": \.signedCommits ] From 13311d4309209adb0055a5de52982b5364197041 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:19:51 -0500 Subject: [PATCH 03/16] Added auto committing to New command --- Sources/Ether/New.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/Ether/New.swift b/Sources/Ether/New.swift index c258686..a5e4557 100644 --- a/Sources/Ether/New.swift +++ b/Sources/Ether/New.swift @@ -51,6 +51,11 @@ public final class New: Command { } newProject.succeed() + + let config = try Configuration.get() + let name = try context.argument("name") + try config.commit(with: config.newCommit, on: context, replacements: [name]) + return context.container.future() } From db581167bc61c67a8181c829d000228714888e6a Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:20:53 -0500 Subject: [PATCH 04/16] Created 2018.10.03 CHANGELOG entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbf212..843e499 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [2018.10.03] + +### Added +- `new-commit` configuration for auto committing when a new project is generated. + ## [2018.09.08] ### Added From bc690d38a01a7d99915c78d78818fa8091d0bdda Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:22:34 -0500 Subject: [PATCH 05/16] Created 'update-commit' config key --- Sources/Ether/Configuration.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Configuration.swift b/Sources/Ether/Configuration.swift index 455887c..f7faeec 100644 --- a/Sources/Ether/Configuration.swift +++ b/Sources/Ether/Configuration.swift @@ -36,6 +36,7 @@ public class Configuration: Command { "- install-commit: The commit message to use on package install. Use '&0' as package name placeholder", "- remove-commit: The commit message to use when a package is removed. Use '&0' as package name placeholder", "- new-commit: The commit message to use when a new project is generated. Use '&0' as the project name placeholder", + "- update-commit: The commit message to use when a project's packages are updated", "- signed-commits: If set to a truthy value (true, yes, y, 1), auto-commits will pass in the '-S' flag" ]), CommandArgument.argument(name: "value", help: ["The new value for the key passed in. If no value is passed in, the key will be removed from the config"]) @@ -114,6 +115,7 @@ public struct Config: Codable, Reflectable { public var installCommit: String? public var removeCommit: String? public var newCommit: String? + public var updateCommit: String? public var signedCommits: String? static let properties: [String: WritableKeyPath] = [ @@ -121,6 +123,7 @@ public struct Config: Codable, Reflectable { "install-commit": \.installCommit, "remove-commit": \.removeCommit, "new-commit": \.newCommit, + "update-commit": \.updateCommit, "signed-commits": \.signedCommits ] From 318b8dbcbd4533c5f71946a5841660a43f127bb7 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:23:21 -0500 Subject: [PATCH 06/16] Added auto committing to Update command --- Sources/Ether/Update.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Update.swift b/Sources/Ether/Update.swift index bf5b3c0..2f5b653 100644 --- a/Sources/Ether/Update.swift +++ b/Sources/Ether/Update.swift @@ -54,6 +54,9 @@ public final class Update: Command { updating.succeed() + let config = try Configuration.get() + try config.commit(with: config.updateCommit, on: context, replacements: []) + if context.options["xcode"] != nil { let xcode = context.console.loadingBar(title: "Generating Xcode Project") _ = xcode.start(on: context.container) From 903143e292db19397a21c5dfcd46463b5cc13e14 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:24:19 -0500 Subject: [PATCH 07/16] Added 'update-commit' config to 2018.10.03 CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 843e499..a7823d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Added - `new-commit` configuration for auto committing when a new project is generated. +- `update-commit` configuration for auto committing when a project's packages are updated. ## [2018.09.08] From c8c26d531e8bf6af1bb281ae47e700084903b8bf Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:26:31 -0500 Subject: [PATCH 08/16] Created 'version-latest-commit' config key --- Sources/Ether/Configuration.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Configuration.swift b/Sources/Ether/Configuration.swift index f7faeec..e3a92d1 100644 --- a/Sources/Ether/Configuration.swift +++ b/Sources/Ether/Configuration.swift @@ -37,6 +37,7 @@ public class Configuration: Command { "- remove-commit: The commit message to use when a package is removed. Use '&0' as package name placeholder", "- new-commit: The commit message to use when a new project is generated. Use '&0' as the project name placeholder", "- update-commit: The commit message to use when a project's packages are updated", + "- version-latest-commit: The commit message to use when you update a project's dependencies to their latest versions", "- signed-commits: If set to a truthy value (true, yes, y, 1), auto-commits will pass in the '-S' flag" ]), CommandArgument.argument(name: "value", help: ["The new value for the key passed in. If no value is passed in, the key will be removed from the config"]) @@ -116,6 +117,7 @@ public struct Config: Codable, Reflectable { public var removeCommit: String? public var newCommit: String? public var updateCommit: String? + public var latestVersionCommit: String? public var signedCommits: String? static let properties: [String: WritableKeyPath] = [ @@ -124,6 +126,7 @@ public struct Config: Codable, Reflectable { "remove-commit": \.removeCommit, "new-commit": \.newCommit, "update-commit": \.updateCommit, + "version-latest-commit": \.latestVersionCommit, "signed-commits": \.signedCommits ] From 33fff7aa6b039d03cc2d89320d573d1e72861443 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:27:14 -0500 Subject: [PATCH 09/16] Added auto committing to VersionLatest command --- Sources/Ether/Version/VersionLatest.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Version/VersionLatest.swift b/Sources/Ether/Version/VersionLatest.swift index 0c761bf..cbc6823 100644 --- a/Sources/Ether/Version/VersionLatest.swift +++ b/Sources/Ether/Version/VersionLatest.swift @@ -78,6 +78,9 @@ public final class VersionLatest: Command { _ = try Process.execute("swift", "package", "update") updating.succeed() + let config = try Configuration.get() + try config.commit(with: config.latestVersionCommit, on: context, replacements: []) + if let _ = context.options["xcode"] { let xcodeBar = context.console.loadingBar(title: "Generating Xcode Project") _ = xcodeBar.start(on: context.container) From 73fc7916404547c3548466b58835142c04673e7e Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:28:13 -0500 Subject: [PATCH 10/16] Added 'version-latest-commit' config to 2018.10.03 CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7823d8..4949a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Added - `new-commit` configuration for auto committing when a new project is generated. - `update-commit` configuration for auto committing when a project's packages are updated. +- `version-latest-commit` configuration for auto committing when a project's dependencies are all updated to their latest versions. ## [2018.09.08] From b0538eb6d54f0ad8274c260175014a521c444d26 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:29:07 -0500 Subject: [PATCH 11/16] Fixed typo in Configuration 'access-token' key help --- Sources/Ether/Configuration.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Ether/Configuration.swift b/Sources/Ether/Configuration.swift index e3a92d1..ad74467 100644 --- a/Sources/Ether/Configuration.swift +++ b/Sources/Ether/Configuration.swift @@ -32,7 +32,7 @@ public class Configuration: Command { CommandArgument.argument(name: "key", help: [ "The configuration JSON key to set", "Valid keys are:", - "- access-token: The GitHub access token to use for interacting the the GraphQL API. You can create on at https://github.com/settings/token", + "- access-token: The GitHub access token to use for interacting the the GraphQL API. You can create one at https://github.com/settings/token", "- install-commit: The commit message to use on package install. Use '&0' as package name placeholder", "- remove-commit: The commit message to use when a package is removed. Use '&0' as package name placeholder", "- new-commit: The commit message to use when a new project is generated. Use '&0' as the project name placeholder", From 4c9c90010995fc09f6f55c740cb1587febd7ca47 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:31:11 -0500 Subject: [PATCH 12/16] Created 'version-set-commit' config key --- Sources/Ether/Configuration.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Configuration.swift b/Sources/Ether/Configuration.swift index ad74467..b54f42a 100644 --- a/Sources/Ether/Configuration.swift +++ b/Sources/Ether/Configuration.swift @@ -38,6 +38,7 @@ public class Configuration: Command { "- new-commit: The commit message to use when a new project is generated. Use '&0' as the project name placeholder", "- update-commit: The commit message to use when a project's packages are updated", "- version-latest-commit: The commit message to use when you update a project's dependencies to their latest versions", + "- version-set-commit: The commit message to use when you set a project's dependency to a specific version. Use '&0' as the package name and '&1' as the package's new version placeholders", "- signed-commits: If set to a truthy value (true, yes, y, 1), auto-commits will pass in the '-S' flag" ]), CommandArgument.argument(name: "value", help: ["The new value for the key passed in. If no value is passed in, the key will be removed from the config"]) @@ -118,6 +119,7 @@ public struct Config: Codable, Reflectable { public var newCommit: String? public var updateCommit: String? public var latestVersionCommit: String? + public var versionSetCommit: String? public var signedCommits: String? static let properties: [String: WritableKeyPath] = [ @@ -127,6 +129,7 @@ public struct Config: Codable, Reflectable { "new-commit": \.newCommit, "update-commit": \.updateCommit, "version-latest-commit": \.latestVersionCommit, + "version-set-commit": \.versionSetCommit, "signed-commits": \.signedCommits ] From 28fb53c2e84310d79351700c24da64696d9c3ec9 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:32:01 -0500 Subject: [PATCH 13/16] Added auto committing to VersionSet command --- Sources/Ether/Version/VersionSet.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/Ether/Version/VersionSet.swift b/Sources/Ether/Version/VersionSet.swift index b846420..eef2c65 100644 --- a/Sources/Ether/Version/VersionSet.swift +++ b/Sources/Ether/Version/VersionSet.swift @@ -64,6 +64,9 @@ public final class VersionSet: Command { _ = try Process.execute("swift", "package", "update") updating.succeed() + let config = try Configuration.get() + try config.commit(with: config.versionSetCommit, on: context, replacements: [package, version]) + if let _ = context.options["xcode"] { let xcodeBar = context.console.loadingBar(title: "Generating Xcode Project") _ = xcodeBar.start(on: context.container) From 710ecba1aa29aae0f0a91018d123c2a3b7c371c0 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:32:40 -0500 Subject: [PATCH 14/16] Added 'version-set-commit' config to 2018.10.03 CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4949a2b..87dd2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - `new-commit` configuration for auto committing when a new project is generated. - `update-commit` configuration for auto committing when a project's packages are updated. - `version-latest-commit` configuration for auto committing when a project's dependencies are all updated to their latest versions. +- `version-set-commit` configuration for auto committing when a project's dependency's version is updated. ## [2018.09.08] From 9f24958ba0cc349a3af1c6799a597f8a57f9a08a Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:40:46 -0500 Subject: [PATCH 15/16] Fixed JSON key used to get license info during package search --- Sources/Ether/Search.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Ether/Search.swift b/Sources/Ether/Search.swift index 8ffc49d..6d4da6b 100644 --- a/Sources/Ether/Search.swift +++ b/Sources/Ether/Search.swift @@ -70,7 +70,7 @@ public final class Search: Command { struct PackageDescription: Codable { let nameWithOwner: String let description: String? - let license: String? + let licenseInfo: String? let stargazers: Int? func print(on context: CommandContext) { @@ -81,7 +81,8 @@ struct PackageDescription: Codable { context.console.info(self.nameWithOwner) } - if let license = self.license { + if let licenseInfo = self.licenseInfo { + let license = licenseInfo == "NOASSERTION" ? "Unknown" : licenseInfo context.console.print("License: " + license) } From be9e145ae15b3b7cb8d4c7047554ce78891bc9e4 Mon Sep 17 00:00:00 2001 From: Caleb Kleveter Date: Wed, 3 Oct 2018 16:41:42 -0500 Subject: [PATCH 16/16] Added license JSON key to 2018.10.03 CHANGELOG entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87dd2b8..76e6e19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - `version-latest-commit` configuration for auto committing when a project's dependencies are all updated to their latest versions. - `version-set-commit` configuration for auto committing when a project's dependency's version is updated. +### Fixed +- JSON key used to get license info during package search + ## [2018.09.08] ### Added