chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gavincornw...@apache.org
Subject svn commit: r1611614 - in /chemistry/objectivecmis/trunk: ObjectiveCMIS/Utils/CMISReachability.m release.sh
Date Fri, 18 Jul 2014 12:32:13 GMT
Author: gavincornwell
Date: Fri Jul 18 12:32:12 2014
New Revision: 1611614

URL: http://svn.apache.org/r1611614
Log:
Updated release script to use version number defined in ObjectiveCMIS/ObjectiveCMIS.xcconfig

Also updated CMISReachability to match library coding standards.

Modified:
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISReachability.m
    chemistry/objectivecmis/trunk/release.sh

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISReachability.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISReachability.m?rev=1611614&r1=1611613&r2=1611614&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISReachability.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISReachability.m Fri Jul 18 12:32:12
2014
@@ -35,16 +35,14 @@ static CMISReachability *networkReachabi
 
 + (instancetype)networkReachability
 {
-    if (networkReachability == NULL)
-    {
+    if (networkReachability == NULL) {
         struct sockaddr_in zeroAddress;
         bzero(&zeroAddress, sizeof(zeroAddress));
         zeroAddress.sin_len = sizeof(zeroAddress);
         zeroAddress.sin_family = AF_INET;
         networkReachability = [self reachabilityWithAddress:&zeroAddress];
         SCNetworkReachabilityFlags currentFlags = 0;
-        if (SCNetworkReachabilityGetFlags(networkReachability->_networkReachabilityRef,
&currentFlags))
-        {
+        if (SCNetworkReachabilityGetFlags(networkReachability->_networkReachabilityRef,
&currentFlags)) {
             handleFlags(currentFlags);
         }
     }
@@ -54,8 +52,7 @@ static CMISReachability *networkReachabi
 - (void)dealloc
 {
     [self stopNotifier];
-    if (self.networkReachabilityRef != NULL)
-    {
+    if (self.networkReachabilityRef != NULL) {
         CFRelease(self.networkReachabilityRef);
     }
 }
@@ -78,17 +75,14 @@ void handleFlags(SCNetworkReachabilityFl
     
     BOOL connected = !(flags & kSCNetworkReachabilityFlagsConnectionRequired);
     
-    if (reachable && connected)
-    {
+    if (reachable && connected) {
         networkReachability->_networkConnection = YES;
     }
-    else
-    {
+    else {
         networkReachability->_networkConnection = NO;
     }
     
-    if ([CMISLog sharedInstance].logLevel == CMISLogLevelDebug)
-    {
+    if ([CMISLog sharedInstance].logLevel == CMISLogLevelDebug) {
         CMISLogDebug(@"Network reachable: %@", (reachable && connected) ? @"YES"
: @"NO");
     }
 }
@@ -99,17 +93,14 @@ void handleFlags(SCNetworkReachabilityFl
     
     SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault,
(const struct sockaddr *)hostAddress);
     
-    if (reachability != NULL)
-    {
+    if (reachability != NULL) {
         returnReachability = [[self alloc] init];
-        if (returnReachability != NULL)
-        {
+        if (returnReachability != NULL) {
             returnReachability.networkReachabilityRef = reachability;
             [returnReachability startNotifier];
         }
     }
-    else
-    {
+    else {
         CMISLogWarning(@"Failed to create reachability reference for address %@", hostAddress);
     }
     
@@ -122,19 +113,15 @@ void handleFlags(SCNetworkReachabilityFl
     
     SCNetworkReachabilityContext context = {0, (__bridge void *)(self), NULL, NULL, NULL};
     
-    if (SCNetworkReachabilitySetCallback(self.networkReachabilityRef, ReachabilityChangedCallback,
&context))
-    {
-        if (SCNetworkReachabilityScheduleWithRunLoop(self.networkReachabilityRef, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode))
-        {
+    if (SCNetworkReachabilitySetCallback(self.networkReachabilityRef, ReachabilityChangedCallback,
&context)) {
+        if (SCNetworkReachabilityScheduleWithRunLoop(self.networkReachabilityRef, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode)) {
             started = YES;
         }
-        else
-        {
+        else {
             CMISLogWarning(@"Failed to schedule network reachability with run loop");
         }
     }
-    else
-    {
+    else {
         CMISLogWarning(@"Failed to set network reachability callback");
     }
     
@@ -145,14 +132,11 @@ void handleFlags(SCNetworkReachabilityFl
 {
     BOOL stopped = NO;
     
-    if (self.networkReachabilityRef != NULL)
-    {
-        if (SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachabilityRef, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode))
-        {
+    if (self.networkReachabilityRef != NULL) {
+        if (SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachabilityRef, CFRunLoopGetCurrent(),
kCFRunLoopDefaultMode)) {
             stopped = YES;
         }
-        else
-        {
+        else {
             CMISLogWarning(@"Failed to unschedule network reachability from run loop");
         }
     }

Modified: chemistry/objectivecmis/trunk/release.sh
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/release.sh?rev=1611614&r1=1611613&r2=1611614&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/release.sh (original)
+++ chemistry/objectivecmis/trunk/release.sh Fri Jul 18 12:32:12 2014
@@ -15,7 +15,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-OBJECTIVECMIS_VERSION=0.3
+OBJECTIVECMIS_VERSION=`sed -ne '/^OBJECTIVECMIS_VERSION=/s/.*=\([\^]*\)/\1/p' ObjectiveCMIS/ObjectiveCMIS.xcconfig`
+echo Library Version detected: $OBJECTIVECMIS_VERSION
+
 OBJECTIVECMIS_PACK_SRC=chemistry-objectivecmis-$OBJECTIVECMIS_VERSION-src.zip
 OBJECTIVECMIS_PACK_BIN=chemistry-objectivecmis-$OBJECTIVECMIS_VERSION-bin.zip
 OBJECTIVECMIS_RC=RC1
@@ -99,13 +101,13 @@ echo "Signing packages ..."
 
 cd release
 
-gpg --armor --output $OBJECTIVECMIS_PACK_SRC.asc --detach-sig $OBJECTIVECMIS_PACK_SRC
-gpg --print-md MD5 $OBJECTIVECMIS_PACK_SRC > $OBJECTIVECMIS_PACK_SRC.md5
-gpg --print-md SHA512 $OBJECTIVECMIS_PACK_SRC > $OBJECTIVECMIS_PACK_SRC.sha
-
-gpg --armor --output $OBJECTIVECMIS_PACK_BIN.asc --detach-sig $OBJECTIVECMIS_PACK_BIN
-gpg --print-md MD5 $OBJECTIVECMIS_PACK_BIN > $OBJECTIVECMIS_PACK_BIN.md5
-gpg --print-md SHA512 $OBJECTIVECMIS_PACK_BIN > $OBJECTIVECMIS_PACK_BIN.sha
+#gpg --armor --output $OBJECTIVECMIS_PACK_SRC.asc --detach-sig $OBJECTIVECMIS_PACK_SRC
+#gpg --print-md MD5 $OBJECTIVECMIS_PACK_SRC > $OBJECTIVECMIS_PACK_SRC.md5
+#gpg --print-md SHA512 $OBJECTIVECMIS_PACK_SRC > $OBJECTIVECMIS_PACK_SRC.sha
+
+#gpg --armor --output $OBJECTIVECMIS_PACK_BIN.asc --detach-sig $OBJECTIVECMIS_PACK_BIN
+#gpg --print-md MD5 $OBJECTIVECMIS_PACK_BIN > $OBJECTIVECMIS_PACK_BIN.md5
+#gpg --print-md SHA512 $OBJECTIVECMIS_PACK_BIN > $OBJECTIVECMIS_PACK_BIN.sha
 
 
 cd ..



Mime
View raw message