From 2b29f49f6e619d1c69db05842e10344d2fbc8e70 Mon Sep 17 00:00:00 2001 From: Eugene Kalyada Date: Mon, 18 Mar 2019 20:21:41 +0500 Subject: [PATCH 1/3] doc: (config) Update Readme instruction Fixed Getting started section --- README.md | 12 +++++++----- gitcom.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d1a8f7f..7374f4d 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,11 @@ Utility for making beautiful commit and check commit message format ## Getting Started -1. Download the project, open it in Xcode and build. -2. In Project navigator (left panel), open Products directory. -3. Right-click on gitcom executable -> Show in Finder. Copy executable gitcom file into your project directory. +1. Download the project, open it in Xcode. +2. Change the Team Signing section in project file. +3. Build and archive project. +4. Open the directory with executable file. +5. Run `./gitcom integrate git` to install app in your system (copy gitcom executable file into usr/loclal/bin directory. Allows to use **gitcom**, **git cm** and **git-cm** commands ). ## Usage @@ -27,7 +29,7 @@ To create default configuration file, run **gitcom generate-config**.
Default configuration file -``` +```json { "body" : { "request" : "Please enter a body of commit", @@ -202,5 +204,5 @@ Configuration file structure: ### Validate commit Run **gitcom validate** command with commit message as argument for its validation. -
Example: gitcom validate "build: (fix) subject|body|META:footer" +
Example: `gitcom validate "build: (fix) subject|body|META:footer"` \ No newline at end of file diff --git a/gitcom.xcodeproj/project.pbxproj b/gitcom.xcodeproj/project.pbxproj index 03a986c..8779803 100755 --- a/gitcom.xcodeproj/project.pbxproj +++ b/gitcom.xcodeproj/project.pbxproj @@ -369,9 +369,11 @@ A1BA76972234448200806C32 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 3LLP5BAPPE; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.2; }; name = Debug; @@ -379,9 +381,11 @@ A1BA76982234448200806C32 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 3LLP5BAPPE; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 4.2; }; name = Release; From 6febdfb00be3e2b1507ba73855fc76fb6dcd2413 Mon Sep 17 00:00:00 2001 From: Eugene Kalyada Date: Mon, 18 Mar 2019 20:33:22 +0500 Subject: [PATCH 2/3] fix: (validation) Allow empty body of commit Fixed checking empty body --- .../xcdebugger/Breakpoints_v2.xcbkptlist | 4 ++-- gitcom/Commands/ValidateCommand.swift | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gitcom.xcodeproj/xcuserdata/gener.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/gitcom.xcodeproj/xcuserdata/gener.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 8dbfbf7..52fdf22 100755 --- a/gitcom.xcodeproj/xcuserdata/gener.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/gitcom.xcodeproj/xcuserdata/gener.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -303,8 +303,8 @@ endingColumnNumber = "9223372036854775807" startingLineNumber = "179" endingLineNumber = "179" - landmarkName = "validate(config:parts:)" - landmarkType = "7"> + landmarkName = "ValidateCommand" + landmarkType = "3"> Bool { guard let bodyString = body, !bodyString.isEmpty else { - print(error: "Commit message must not be empty.") - return false + if let min = bodySettings.length.min, min.value > 0 { + print(error: "Commit message must not be empty.") + return false + } + else { + return true + } } if let min = bodySettings.length.min, min.value > bodyString.count { print(error: min.insufficient(prefix: "Body")) From f1c0105595b71a058ea1354f3cd828825996c4f5 Mon Sep 17 00:00:00 2001 From: Eugene Kalyada Date: Fri, 5 Apr 2019 00:15:30 +0500 Subject: [PATCH 3/3] fix: (validation) fix message for skip action Reaplces message resource from custom to skip --- gitcom/Commands/CommitCommand.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitcom/Commands/CommitCommand.swift b/gitcom/Commands/CommitCommand.swift index 17d11e7..d19299d 100755 --- a/gitcom/Commands/CommitCommand.swift +++ b/gitcom/Commands/CommitCommand.swift @@ -48,7 +48,7 @@ Make beautiful commit. print(item: ScopeItem(key: Constants.customScopeKey, value: header.customScope.request, types: nil), key: Constants.customScopeIndex) } if header.scope.skip { - print(item: ScopeItem(key: Constants.skipScopeKey, value: header.scope.skiptRequest, types: nil), key: Constants.customScopeIndex) + print(item: ScopeItem(key: Constants.skipScopeKey, value: header.scope.skiptRequest, types: nil), key: Constants.skipScopeIndex) } guard let input = readLine()?.trimmingCharacters(in: .whitespacesAndNewlines) else { return takeScope(header: header, type: type)