Skip to content

Commit

Permalink
Version 1.5
Browse files Browse the repository at this point in the history
Update Xcode project so Travis CI can build
  • Loading branch information
anders committed Apr 13, 2019
1 parent 13ce125 commit 1212ca4
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 5 deletions.
7 changes: 7 additions & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# sf-pwgen version history

## 1.5 (2019-04-13)
* Warn if passwords are shorter than requested. Thanks to @dancek for implementing this.
* Updated Xcode project to fix Travis CI (had to add a unit test).

## 1.4 (2016-10-31)
* Fix crash bug on Sierra.

## 1.3 (2014-04-17)
* System requirements are now Mountain Lion (10.8) and later.
* Show default password length and count in help output.
Expand Down
22 changes: 22 additions & 0 deletions sf-pwgen-test/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
37 changes: 37 additions & 0 deletions sf-pwgen-test/sf_pwgen_test.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// sf_pwgen_test.m
// sf-pwgen-test
//
// Created by Anders Bergh on 2019-04-13.
// Copyright (c) 2019 Anders Bergh. All rights reserved.
//

#import <XCTest/XCTest.h>

@interface sf_pwgen_test : XCTestCase

@end

@implementation sf_pwgen_test

- (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

- (void)testExample {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}

- (void)testPerformanceExample {
// This is an example of a performance test case.
[self measureBlock:^{
// Put the code you want to measure the time of here.
}];
}

@end
6 changes: 3 additions & 3 deletions sf-pwgen.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* sf-pwgen.m -- macOS command line password generator
* Copyright (c) 2012-2014 Anders Bergh <anders1@gmail.com>
* Copyright (c) 2012-2019 Anders Bergh <anders1@gmail.com>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
Expand Down Expand Up @@ -32,7 +32,7 @@
#import "SFPasswordAssistant.h"

#define PROJECT "sf-pwgen"
#define VERSION "1.4"
#define VERSION "1.5"

// The length limit used to be the same as in Keychain Access (min 8, max 31).
#define PASS_MIN_LENGTH 8
Expand Down Expand Up @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) {

case 'l':
length = atoi(optarg);
// the user requested a specific length; warn if it's not fultilled.
// the user requested a specific length; warn if it's not fulfilled.
warn_about_length = true;
break;

Expand Down
176 changes: 174 additions & 2 deletions sf-pwgen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
9A07D7B416E1BD380042A1BE /* sf-pwgen.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A07D7B316E1BD380042A1BE /* sf-pwgen.m */; };
9A07D7B616E1BD870042A1BE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A07D7B516E1BD870042A1BE /* Foundation.framework */; };
9A850B2216E1B78F001E2417 /* SecurityFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A850B2116E1B78F001E2417 /* SecurityFoundation.framework */; };
9AD5B5A02261926000D93A1F /* sf_pwgen_test.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -30,6 +31,9 @@
9A850B1016E1B750001E2417 /* sf-pwgen */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "sf-pwgen"; sourceTree = BUILT_PRODUCTS_DIR; };
9A850B2116E1B78F001E2417 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; };
9A92F282182BDCD900CA808B /* SFPasswordAssistant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SFPasswordAssistant.h; sourceTree = SOURCE_ROOT; };
9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "sf-pwgen-test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = sf_pwgen_test.m; sourceTree = "<group>"; };
9AD5B5A12261926000D93A1F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -42,13 +46,21 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
9AD5B59A2261926000D93A1F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
9A850B0716E1B750001E2417 = {
isa = PBXGroup;
children = (
9A850B1516E1B750001E2417 /* sf-pwgen */,
9AD5B59E2261926000D93A1F /* sf-pwgen-test */,
9A850B1216E1B750001E2417 /* Frameworks */,
9A850B1116E1B750001E2417 /* Products */,
);
Expand All @@ -59,6 +71,7 @@
isa = PBXGroup;
children = (
9A850B1016E1B750001E2417 /* sf-pwgen */,
9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -81,6 +94,15 @@
path = "sf-pwgen";
sourceTree = "<group>";
};
9AD5B59E2261926000D93A1F /* sf-pwgen-test */ = {
isa = PBXGroup;
children = (
9AD5B59F2261926000D93A1F /* sf_pwgen_test.m */,
9AD5B5A12261926000D93A1F /* Info.plist */,
);
path = "sf-pwgen-test";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -101,6 +123,23 @@
productReference = 9A850B1016E1B750001E2417 /* sf-pwgen */;
productType = "com.apple.product-type.tool";
};
9AD5B59C2261926000D93A1F /* sf-pwgen-test */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9AD5B5A42261926000D93A1F /* Build configuration list for PBXNativeTarget "sf-pwgen-test" */;
buildPhases = (
9AD5B5992261926000D93A1F /* Sources */,
9AD5B59A2261926000D93A1F /* Frameworks */,
9AD5B59B2261926000D93A1F /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "sf-pwgen-test";
productName = "sf-pwgen-test";
productReference = 9AD5B59D2261926000D93A1F /* sf-pwgen-test.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -109,12 +148,22 @@
attributes = {
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "Anders Bergh";
TargetAttributes = {
9A850B0F16E1B750001E2417 = {
ProvisioningStyle = Automatic;
};
9AD5B59C2261926000D93A1F = {
CreatedOnToolsVersion = 10.2;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 9A850B0B16E1B750001E2417 /* Build configuration list for PBXProject "sf-pwgen" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 9A850B0716E1B750001E2417;
Expand All @@ -123,10 +172,21 @@
projectRoot = "";
targets = (
9A850B0F16E1B750001E2417 /* sf-pwgen */,
9AD5B59C2261926000D93A1F /* sf-pwgen-test */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
9AD5B59B2261926000D93A1F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
9A850B0C16E1B750001E2417 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand All @@ -136,6 +196,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
9AD5B5992261926000D93A1F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9AD5B5A02261926000D93A1F /* sf_pwgen_test.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -199,7 +267,8 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CURRENT_PROJECT_VERSION = 1.3;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.5;
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -209,12 +278,106 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CURRENT_PROJECT_VERSION = 1.3;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.5;
MACOSX_DEPLOYMENT_TARGET = 10.6;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
9AD5B5A22261926000D93A1F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "sf-pwgen-test/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "se.fgsfd.sf-pwgen-test";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
9AD5B5A32261926000D93A1F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
INFOPLIST_FILE = "sf-pwgen-test/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "se.fgsfd.sf-pwgen-test";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -236,6 +399,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9AD5B5A42261926000D93A1F /* Build configuration list for PBXNativeTarget "sf-pwgen-test" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9AD5B5A22261926000D93A1F /* Debug */,
9AD5B5A32261926000D93A1F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 9A850B0816E1B750001E2417 /* Project object */;
Expand Down
10 changes: 10 additions & 0 deletions sf-pwgen.xcodeproj/xcshareddata/xcschemes/sf-pwgen.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9AD5B59C2261926000D93A1F"
BuildableName = "sf-pwgen-test.xctest"
BlueprintName = "sf-pwgen-test"
ReferencedContainer = "container:sf-pwgen.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down

0 comments on commit 1212ca4

Please sign in to comment.