Revision a6efa23d fabfile.py

b/fabfile.py
223 223
    env.signdebs = False
224 224

  
225 225

  
226
# Commands which automatically add and reset the version files which are not tracked by
227
# git. Those version files are created from each setup.py using the synnefo-common
228
# update_version, so we execute `python setup.py clean` to ensure that file gets
229
# created and git add will not fail. The reset of those files after each build
230
# certifies that succeded git checkouts will not fail due to existing local
231
# changes.
232
add_versions_cmd = "find . -regextype posix-egrep -regex \".*version.py$|.*\/synnefo\/versions\/.*py$\" -exec git add -f {} \;"
233
reset_versions_cmd = "find . -regextype posix-egrep -regex \".*version.py$|.*\/synnefo\/versions\/.*py$\" -exec git reset {} \;"
234

  
226 235

  
227 236
def builddeb(p, master="master", branch="debian-0.8"):
228 237
    with co(branch):
......
231 240
            local("git merge master")
232 241
            local("if [ ! -d .git ]; then mkdir .git; fi")
233 242
            local("python setup.py clean")
234
            local("git add synnefo/versions/*.py -f")
243
            local(add_versions_cmd)
235 244
            local(("git-buildpackage --git-upstream-branch=%s --git-debian-branch=%s"
236 245
                   " --git-export=INDEX --git-ignore-new %s") %
237 246
                   (master, branch, "" if env.signdebs else "-us -uc"))
238 247
            local("rm -rf .git")
239
            local("git reset synnefo/versions/*.py")
248
            local(reset_versions_cmd)
240 249
        info("Done building debian package for %s" % p)
241 250

  
242 251

  

Also available in: Unified diff