Skip to content

Commit

Permalink
Actually cleaning, and creating dist/ dir when needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfly committed Jun 22, 2012
1 parent 42493d5 commit e5b132d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tmt
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,6 @@ class EclipseProject(TmtProject):
os.mkdir(self.bin)
if not isdir(self.binResource):
os.mkdir(self.binResource)
if not isdir(self.distDir):
os.mkdir(self.distDir)

def distJarFile(self, includeVersion=True):
# This is a function rather than a static attribute because
Expand Down Expand Up @@ -805,7 +803,7 @@ class EclipseProject(TmtProject):

# We explicitly clean here, because stuff may have ended up in our
# resources folders that we don't want to include in the generated jar file.
self.clean()
tmt._make(projectName=self.name, command='clean')

# We can't run a dist until after we create the tag. This way
# the version number of the resulting file will be correct.
Expand All @@ -822,6 +820,9 @@ class EclipseProject(TmtProject):
assert 0 == os.system(pushTagsCommand)

def dist(self):
if not isdir(self.distDir):
os.mkdir(self.distDir)

tmt._make(projectName=self.name, command='compile')
jar = zipfile.ZipFile(self.distJarFile(), "w", compression=zipfile.ZIP_DEFLATED)

Expand Down

0 comments on commit e5b132d

Please sign in to comment.