Merge lp:~smspillaz/compiz-core/compiz-core.drop-git into lp:compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 2947
Merged at revision: 2966
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.drop-git
Merge into: lp:compiz-core/0.9.5
Diff against target: 262 lines (+30/-178)
1 file modified
cmake/CompizCommon.cmake (+30/-178)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.drop-git
Reviewer Review Type Date Requested Status
Alan Griffiths Approve
Thomas Voß Pending
Review via email: mp+89752@code.launchpad.net

Description of the change

Drop support for releasing on git.compiz.org

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Looks fine

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/CompizCommon.cmake'
2--- cmake/CompizCommon.cmake 2012-01-23 11:54:43 +0000
3+++ cmake/CompizCommon.cmake 2012-01-23 18:12:24 +0000
4@@ -69,18 +69,6 @@
5 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}")
6 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}")
7
8-if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
9- set(IS_GIT_REPO 1)
10-else (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
11- set(IS_GIT_REPO 0)
12-endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
13-
14-if (EXISTS ${CMAKE_SOURCE_DIR}/.gitmodules)
15- set(IS_GIT_SUBMODULES_REPO 1)
16-else (EXISTS ${CMAKE_SOURCE_DIR}/.gitmodules)
17- set(IS_GIT_SUBMODULES_REPO 0)
18-endif (EXISTS ${CMAKE_SOURCE_DIR}/.gitmodules)
19-
20 if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
21 set(IS_BZR_REPO 1)
22 elseif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr)
23@@ -103,43 +91,9 @@
24
25 macro (compiz_add_git_dist)
26
27- # Try to use the git and bzr inbuilt functions for generating
28- # archives first, otherwise do it manually
29- if (${IS_GIT_REPO})
30-
31- if (${IS_GIT_SUBMODULES_REPO})
32- find_program (GIT_ARCHIVE_ALL git-archive-all.sh)
33-
34- if (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
35- add_custom_target (dist ${GIT_ARCHIVE_ALL} --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
36- COMMAND bzip2 ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
37- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
38- COMMENT "Creating bz2 archive")
39- else (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
40- add_custom_target (dist
41- COMMAND echo "[WARNING]: git-archive-all.sh is needed to make releases of git submodules, get it from https://github.com/meitar/git-archive-all.sh.git and install it into your PATH"
42- COMMENT "Creating bz2 archive"
43- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
44- message ("[WARNING]: git-archive-all.sh is needed to make releases of git submodules, get it from https://github.com/meitar/git-archive-all.sh.git and install it into your PATH")
45- endif (NOT (${GIT_ARCHIVE_ALL} STREQUAL "GIT_ARCHIVE_ALL-NOTFOUND"))
46- else (${IS_GIT_SUBMODULES_REPO})
47- add_custom_target (dist git archive --format=tar --prefix ${CMAKE_PROJECT_NAME}-${VERSION}/ -o ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar HEAD
48- COMMAND bzip2 ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar
49- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
50- COMMENT "Creating bz2 archive")
51- endif (${IS_GIT_SUBMODULES_REPO})
52- else (${IS_GIT_REPO})
53- if (${IS_BZR_REPO})
54- add_custom_target (dist
55- COMMAND bzr export --root=${CMAKE_PROJECT_NAME}-${VERSION} ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
56- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
57- else (${IS_BZR_REPO})
58- add_custom_target (dist)
59- #add_custom_target (dist
60- # COMMAND tar -cvf ${CMAKE_SOURCE_DIR} | bzip2 > ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
61- # WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../)
62- endif (${IS_BZR_REPO})
63- endif (${IS_GIT_REPO})
64+ add_custom_target (dist
65+ COMMAND bzr export --root=${CMAKE_PROJECT_NAME}-${VERSION} ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
66+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
67
68 endmacro ()
69
70@@ -170,61 +124,17 @@
71 add_custom_target (release-signoff)
72
73 add_custom_target (release-update-working-tree
74- COMMAND cp NEWS ${CMAKE_SOURCE_DIR} && git add ${CMAKE_SOURCE_DIR}/NEWS &&
75- cp AUTHORS ${CMAKE_SOURCE_DIR} && git add ${CMAKE_SOURCE_DIR}/AUTHORS
76+ COMMAND cp NEWS ${CMAKE_SOURCE_DIR} && bzr add ${CMAKE_SOURCE_DIR}/NEWS &&
77+ cp AUTHORS ${CMAKE_SOURCE_DIR} && bzr add ${CMAKE_SOURCE_DIR}/AUTHORS
78 COMMENT "Updating working tree"
79 WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
80
81- if (${IS_GIT_REPO})
82- add_custom_target (release-commits
83- COMMAND git commit -a -m "Update NEWS for ${VERSION}"
84- COMMENT "Release Commit"
85- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
86- add_custom_target (release-tags
87- COMMAND git tag -u $ENV{RELEASE_KEY} compiz-${VERSION} HEAD -m "Compiz ${VERSION} Release"
88- COMMENT "Release Tags"
89- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
90- add_custom_target (release-branch
91- COMMAND git checkout -b compiz-${VERSION}-series &&
92- touch RELEASED &&
93- git add RELEASED &&
94- cat VERSION > RELEASED &&
95- git commit -a -m "Add RELEASED file"
96- COMMENT "Release Branch"
97- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
98- add_custom_target (release-update-dist
99- COMMAND git checkout master &&
100- rm ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 &&
101- make dist
102- COMMENT "Updating bz2 archive"
103- WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
104-
105- if (AUTO_VERSION_UPDATE)
106- add_custom_target (release-version-bump
107- COMMAND git checkout master &&
108- echo "${AUTO_VERSION_UPDATE}" > VERSION &&
109- git add VERSION &&
110- git commit VERSION -m "Bump VERSION"
111- COMMENT "Bumping VERSION"
112- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
113- else (AUTO_VERSION_UPDATE)
114- add_custom_target (release-version-bump
115- COMMAND git checkout master &&
116- $ENV{EDITOR} VERSION &&
117- git add VERSION &&
118- git commit VERSION -m "Bump VERSION"
119- COMMENT "Bumping VERSION"
120- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
121- endif (AUTO_VERSION_UPDATE)
122-
123- else (${IS_GIT_REPO})
124- add_custom_target (release-commits)
125- add_custom_target (release-tags)
126- add_custom_target (release-branch)
127- add_custom_target (release-update-dist)
128- add_custom_target (release-version-bump)
129-
130- endif (${IS_GIT_REPO})
131+ # TODO
132+ add_custom_target (release-commits)
133+ add_custom_target (release-tags)
134+ add_custom_target (release-branch)
135+ add_custom_target (release-update-dist)
136+ add_custom_target (release-version-bump)
137
138 add_custom_target (release-sign-tarballs
139 COMMAND gpg --armor --sign --detach-sig ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2
140@@ -248,29 +158,12 @@
141 add_dependencies (release-sha1-tarballs release-sign-tarballs)
142 add_dependencies (release-sign-sha1-tarballs release-sha1-tarballs)
143
144- # This means that releasing needs to be done from a git repo for now
145- # But that's fine
146 add_dependencies (release-signoff release-sign-sha1-tarballs)
147
148 # Actually pushes the release
149- if (${IS_GIT_REPO})
150- add_custom_target (push-master
151- COMMAND git push origin master
152- COMMENT "Pushing to master"
153- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
154- add_custom_target (push-release-branch
155- COMMAND git push origin compiz-${VERSION}-series
156- COMMENT "Pushing to compiz-${VERSION}-series"
157- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
158- add_custom_target (push-tag
159- COMMAND git push origin compiz-${VERSION}
160- COMMENT "Pushing tag compiz-${VERSION}"
161- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
162- else (${IS_GIT_REPO})
163- add_custom_target (push-master)
164- add_custom_target (push-release-branch)
165- add_custom_target (push-tag)
166- endif (${IS_GIT_REPO})
167+ add_custom_target (push-master)
168+ add_custom_target (push-release-branch)
169+ add_custom_target (push-tag)
170
171 add_custom_target (release-push)
172
173@@ -279,23 +172,9 @@
174 add_dependencies (push-tag push-master)
175
176 # Push the tarball to releases.compiz.org
177- set (COMPIZ_RELEASE_UPLOAD_HOST releases.compiz.org)
178- set (COMPIZ_RELEASE_UPLOAD_BASE /home/releases)
179- set (COMPIZ_RELEASE_UPLOAD_DIR_VERSION ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}/)
180- set (COMPIZ_RELEASE_UPLOAD_DIR_COMPONENT ${COMPIZ_RELEASE_UPLOAD_BASE}/components/${CMAKE_PROJECT_NAME})
181-
182- add_custom_target (release-upload-version
183- COMMAND ssh $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST} "mkdir -p ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}" && scp ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST}:${COMPIZ_RELEASE_UPLOAD_DIR_VERSION}
184- COMMENT "Uploading ${CMAKE_PROJECT_NAME}-${VERSION} to ${VERSION}"
185- WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
186
187 # Does nothing for now
188 add_custom_target (release-upload-component)
189- #add_custom_target (release-upload-component
190- # COMMAND ssh $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST} "mkdir -p ${COMPIZ_RELEASE_UPLOAD_BASE}/${VERSION}" && scp ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2 ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.asc ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1 ${CMAKE_PROJECT_NAME}-${VERSION}.tar.bz2.sha1.asc $ENV{USER}@${COMPIZ_RELEASE_UPLOAD_HOST}:${COMPIZ_RELEASE_UPLOAD_BASE_DIR_COMPONENT}
191- # COMMENT "Uploading ${CMAKE_PROJECT_NAME}-${VERSION} to ${CMAKE_PROJECT_NAME}/${VERSION}"
192- # WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
193-
194 add_custom_target (release-upload)
195
196 add_dependencies (release-upload-component release-upload-version)
197@@ -315,49 +194,22 @@
198 file (WRITE ${CMAKE_SOURCE_DIR}/.AUTHORS.sed "")
199 endif (NOT EXISTS ${CMAKE_SOURCE_DIR}/.AUTHORS.sed)
200
201- if (${IS_GIT_REPO})
202- find_program (GEN_GIT_LOG gen-git-log.sh)
203- add_custom_target (authors
204- COMMAND git shortlog -se | cut -c8- | sed -r -f ${CMAKE_SOURCE_DIR}/.AUTHORS.sed | sort -u > AUTHORS
205- COMMENT "Generating AUTHORS"
206- WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
207-
208- if (AUTO_NEWS_UPDATE)
209- add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
210- COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`git config user.name`' <'`git config user.email`'>)' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo '${AUTO_NEWS_UPDATE}' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
211- COMMENT "Generating NEWS Header"
212- WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
213- else (AUTO_NEWS_UPDATE)
214- add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
215- COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`git config user.name`' <'`git config user.email`'>)' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
216- COMMENT "Generating NEWS Header"
217- WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
218- endif (AUTO_NEWS_UPDATE)
219-
220- else (${IS_GIT_REPO})
221- if (${IS_BZR_REPO})
222- add_custom_target (authors
223- COMMAND bzr log --long --levels=0 | grep -e "^\\s*author:" -e "^\\s*committer:" | cut -d ":" -f 2 | sed -r -f ${CMAKE_SOURCE_DIR}/.AUTHORS.sed | sort -u > AUTHORS
224- COMMENT "Generating AUTHORS")
225-
226- if (AUTO_NEWS_UPDATE)
227-
228- add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
229- COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`bzr config email`')' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo '${AUTO_NEWS_UPDATE}' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
230- COMMENT "Generating NEWS Header"
231- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
232- else (AUTO_NEWS_UPDATE)
233- add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
234- COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`bzr config email`')' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
235- COMMENT "Generating NEWS Header"
236- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
237- endif (AUTO_NEWS_UPDATE)
238-
239- else (${IS_BZR_REPO})
240- add_custom_target (authors)
241- add_custom_target (news-header)
242- endif (${IS_BZR_REPO})
243- endif (${IS_GIT_REPO})
244+ add_custom_target (authors
245+ COMMAND bzr log --long --levels=0 | grep -e "^\\s*author:" -e "^\\s*committer:" | cut -d ":" -f 2 | sed -r -f ${CMAKE_SOURCE_DIR}/.AUTHORS.sed | sort -u > AUTHORS
246+ COMMENT "Generating AUTHORS")
247+
248+ if (AUTO_NEWS_UPDATE)
249+
250+ add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
251+ COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`bzr config email`')' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo '${AUTO_NEWS_UPDATE}' >> ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
252+ COMMENT "Generating NEWS Header"
253+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
254+ else (AUTO_NEWS_UPDATE)
255+ add_custom_target (news-header echo > ${CMAKE_BINARY_DIR}/NEWS.update
256+ COMMAND echo 'Release ${VERSION} ('`date +%Y-%m-%d`' '`bzr config email`')' > ${CMAKE_BINARY_DIR}/NEWS.update && seq -s "=" `cat ${CMAKE_BINARY_DIR}/NEWS.update | wc -c` | sed 's/[0-9]//g' >> ${CMAKE_BINARY_DIR}/NEWS.update && $ENV{EDITOR} ${CMAKE_BINARY_DIR}/NEWS.update && echo >> ${CMAKE_BINARY_DIR}/NEWS.update
257+ COMMENT "Generating NEWS Header"
258+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
259+ endif (AUTO_NEWS_UPDATE)
260
261 add_custom_target (news
262 COMMAND cat ${CMAKE_SOURCE_DIR}/NEWS > NEWS.old &&

Subscribers

People subscribed via source and target branches