Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweak build script to only set version number if we're in a git repos…

…itory

Add readme for GHUnit
  • Loading branch information...
commit 7bcac05713707738b6724c3e033f4cc6c0d50b16 1 parent 3cb0230
@pokeb authored
View
2  Build Scripts/set_version_number.rb
@@ -3,7 +3,7 @@
# This script sets a version number for ASIHTTPRequest based on the last commit, and is run when you build one of the targets in the Xcode projects that come with ASIHTTPRequest
# It only really needs to run on my computer, not on yours... :)
require 'find'
-if (File.exists?('/usr/local/bin/git'))
+if (File.exists?('.git') && File.directory?('.git') && File.exists?('/usr/local/bin/git'))
newversion = `/usr/local/bin/git describe --tags`.match(/(v([0-9]+)(\.([0-9]+)){1,}-([0-9]+))/).to_s.gsub(/[0-9]+$/){|commit| (commit.to_i + 1).to_s}+Time.now.strftime(" %Y-%m-%d")
buffer = File.new('Classes/ASIHTTPRequest.m','r').read
if !buffer.match(/#{Regexp.quote(newversion)}/)
View
3  External/GHUnit/README-GHUnit
@@ -0,0 +1,3 @@
+This folder is where ASIHTTPRequest looks for GHUnit frameworks.
+
+When you run one of the test targets, a build script will attempt to download a pre-compiled framework and install it here, if one does not already exist. If you would prefer to build GHUnit yourself, simply grab a copy from https://github.com/gabriel/gh-unit, and drop your built framework in this folder.
Please sign in to comment.
Something went wrong with that request. Please try again.