Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2010-10-03 13:45:46 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
93603f8e9009436b8ddd777469c4fa4decfda52b
93603f8e
1 parent
00e9af4a
Whoops, forgot to change the path when I switched to homebrew.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
Classes/ASIHTTPRequest.m
set_version_number.rb
Classes/ASIHTTPRequest.m
View file @
93603f8
...
...
@@ -24,7 +24,7 @@
#import "ASIDataCompressor.h"
// Automatically set on build
NSString
*
ASIHTTPRequestVersion
=
@"v1.7-
56 2010-08-30
"
;
NSString
*
ASIHTTPRequestVersion
=
@"v1.7-
97 2010-10-03
"
;
NSString
*
const
NetworkRequestErrorDomain
=
@"ASIHTTPRequestErrorDomain"
;
...
...
set_version_number.rb
View file @
93603f8
...
...
@@ -3,8 +3,8 @@
# 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?
(
'/
opt
/local/bin/git'
))
newversion
=
`/
opt
/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"
)
if
(
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
)
}
/
)
buffer
=
buffer
.
sub
(
/(NSString \*ASIHTTPRequestVersion = @\")(.*)(";)/
,
'\1'
+
newversion
+
'\3'
);
...
...
Please
register
or
login
to post a comment