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-03-25 11:05:25 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
356a342a7ce451628ea743d97ca6f45cb863f1b5
356a342a
1 parent
16eceb33
[super init] => [self init]
Tweak autoversioning script to work with v1.1.x scheme
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 @
356a342
...
...
@@ -23,7 +23,7 @@
// Automatically set on build
NSString
*
ASIHTTPRequestVersion
=
@" 2010-03-25"
;
NSString
*
ASIHTTPRequestVersion
=
@"
v1.6.1-2
2010-03-25"
;
NSString
*
const
NetworkRequestErrorDomain
=
@"ASIHTTPRequestErrorDomain"
;
...
...
@@ -221,7 +221,7 @@ static BOOL isiPhoneOS2;
-
(
id
)
initWithURL
:
(
NSURL
*
)
newURL
{
self
=
[
s
uper
init
];
self
=
[
s
elf
init
];
[
self
setRequestMethod
:
@"GET"
];
[
self
setShouldAttemptPersistentConnection
:
YES
];
...
...
set_version_number.rb
View file @
356a342
#!/usr/bin/env ruby
require
'find'
newversion
=
`/opt/local/bin/git describe --tags`
.
match
(
/(v([0-9]+)
\.([0-9]+)
-([0-9]+))/
).
to_s
.
gsub
(
/[0-9]+$/
){
|
commit
|
(
commit
.
to_i
+
1
).
to_s
}
+
Time
.
now
.
strftime
(
" %Y-%m-%d"
)
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"
)
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