cmake: Followup on release commit automation.
This is a followup on 93f906e2
.
Simplify the FileIterator interface by doing the eof check in
fi_get_next_line().
Add rollback instructions to final instructions message.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
parent
93f906e2db
commit
5de47935cf
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
function(fi_open_file file)
|
function(fi_open_file file)
|
||||||
file(READ "${file}" fi_file_contents)
|
file(READ "${file}" fi_file_contents)
|
||||||
|
|
||||||
set(fi_file_contents "${fi_file_contents}" PARENT_SCOPE)
|
set(fi_file_contents "${fi_file_contents}" PARENT_SCOPE)
|
||||||
|
set(fi_done FALSE PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(fi_get_next_line)
|
function(fi_get_next_line)
|
||||||
|
@ -14,11 +16,6 @@ function(fi_get_next_line)
|
||||||
|
|
||||||
string(SUBSTRING "${fi_file_contents}" ${pos} -1 fi_file_contents)
|
string(SUBSTRING "${fi_file_contents}" ${pos} -1 fi_file_contents)
|
||||||
|
|
||||||
set(fi_line "${fi_line}" PARENT_SCOPE)
|
|
||||||
set(fi_file_contents "${fi_file_contents}" PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(fi_check_done)
|
|
||||||
string(LENGTH "${fi_file_contents}" len)
|
string(LENGTH "${fi_file_contents}" len)
|
||||||
|
|
||||||
set(fi_done FALSE PARENT_SCOPE)
|
set(fi_done FALSE PARENT_SCOPE)
|
||||||
|
@ -26,4 +23,7 @@ function(fi_check_done)
|
||||||
if(len EQUAL 0)
|
if(len EQUAL 0)
|
||||||
set(fi_done TRUE PARENT_SCOPE)
|
set(fi_done TRUE PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(fi_line "${fi_line}" PARENT_SCOPE)
|
||||||
|
set(fi_file_contents "${fi_file_contents}" PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
|
@ -182,8 +182,6 @@ Ignore the following cmake error.
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(APPEND ${work_file} "${fi_line}" "\n")
|
file(APPEND ${work_file} "${fi_line}" "\n")
|
||||||
|
|
||||||
fi_check_done()
|
|
||||||
endwhile()
|
endwhile()
|
||||||
|
|
||||||
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
# Convert to UNIX line endings on Windows, just copy the file otherwise.
|
||||||
|
@ -242,6 +240,12 @@ Run the following commands to push the release commit and tag:
|
||||||
git push
|
git push
|
||||||
git push --tags
|
git push --tags
|
||||||
|
|
||||||
|
**** TO UNDO THE RELEASE ****
|
||||||
|
|
||||||
|
To rollback these changes, run this command:
|
||||||
|
|
||||||
|
cmake .. -DTAG_RELEASE=UNDO
|
||||||
|
|
||||||
Ignore the "configuration incomplete" message following, this mode does not
|
Ignore the "configuration incomplete" message following, this mode does not
|
||||||
build anything.
|
build anything.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue