1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
--
-- Prepare a new Premake release. This is still incomplete and some manual
-- work is needed to get everything packaged up.
--
local function executef(cmd, ...)
cmd = string.format(cmd, unpack(arg))
os.execute(cmd)
end
function dorelease()
--
-- Make sure a version was specified
--
if #_ARGS == 0 then
error("** You must specify a version number", 0)
end
--
-- Look for a release branch in Subversion; create one if necessary
--
--
-- Check out the release branch
--
--
-- Update the version number in premake.c
--
--
-- Make absolutely sure the embedded scripts have been updated
--
--
-- If anything changed in those last two steps, check it in to the branch
--
--
-- Remove .svn, samples, and packages directories
--
--
-- Generate project files to the build directory
--
os.execute("premake4 /to=build/vs2005 vs2005")
os.execute("premake4 /to=build/vs2008 vs2008")
os.execute("premake4 /to=build/gmake.windows /os=windows gmake")
os.execute("premake4 /to=build/gmake.unix /os=linux gmake")
os.execute("premake4 /to=build/gmake.macosx /os=macosx /platform=universal32 gmake")
os.execute("premake4 /to=build/codeblocks.windows /os=windows codeblocks")
os.execute("premake4 /to=build/codeblocks.unix /os=linux codeblocks")
os.execute("premake4 /to=build/codeblocks.macosx /os=macosx /platform=universal32 codeblocks")
os.execute("premake4 /to=build/codelite.windows /os=windows codelite")
os.execute("premake4 /to=build/codelite.unix /os=linux codelite")
os.execute("premake4 /to=build/codelite.macosx /os=macosx /platform=universal32 codelite")
--
-- Create a source package
--
--
-- Create a binary package for this platform. This step requires a working
-- GNU/Make/GCC environment. I use MinGW on Windows.
--
local fname = string.format("premake-%s-%s", _ARGS[1], os.get())
os.chdir("build/gmake." .. os.get())
os.execute("make config=" .. iif(os.is("macosx"), "releaseuniv32", "release"))
os.chdir("../../bin/release")
if os.is("windows") then
executef("7z -tzip a %s.zip premake4.exe", fname)
executef("move %s.zip ../..", fname)
else
executef("tar czvf %s.tar.gz premake", fname)
executef("mv %s.tar.gz ../..", fname)
end
--
-- Upload files to SourceForge
--
--
-- Remind me of required next steps
--
end
|