Skip to content

Commit 9f885e3

Browse files
committed
---
yaml --- r: 69111 b: refs/heads/auto c: 51649b7 h: refs/heads/master i: 69109: 374a96a 69107: d53fb13 69103: e782519 v: v3
1 parent 9fc1ca9 commit 9f885e3

File tree

5 files changed

+217
-142
lines changed

5 files changed

+217
-142
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 79677f05562ecc076feb2ee26958f53fb5fe5603
17+
refs/heads/auto: 51649b763e9115db8c95eaf1c0a3ba55c147ad9d
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/mk/snap.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ define DEF_SNAP_FOR_STAGE_H
1212
# $(1) stage
1313
# $(2) triple
1414

15+
ifdef CFG_INSTALL_SNAP
16+
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
17+
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2) install
18+
else
1519
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
1620
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2)
21+
endif
1722

1823
endef
1924

branches/auto/src/etc/make-snapshot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
import snapshot, sys
55

6-
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2]))
6+
if len(sys.argv) == 3:
7+
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], ""))
8+
else:
9+
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))

branches/auto/src/etc/snapshot.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def hash_file(x):
156156
return scrub(h.hexdigest())
157157

158158

159-
def make_snapshot(stage, triple):
159+
def make_snapshot(stage, triple, flag):
160160
kernel = get_kernel(triple)
161161
platform = get_platform(triple)
162162
rev = local_rev_short_sha()
@@ -190,4 +190,33 @@ def in_tar_name(fn):
190190

191191
shutil.move(file0, file1)
192192

193+
if flag == "install":
194+
# FIXME (#2664): this is an ugly quick hack; pls make it better
195+
path = file1
196+
comps = path.split("-")
197+
parts = { 'year': comps[2], \
198+
'month': comps[3], \
199+
'date': comps[4], \
200+
'check': comps[5], \
201+
'plat': comps[6], \
202+
'arch': comps[7], \
203+
'sha': comps[8].split(".")[0] }
204+
205+
shutil.move(path, "dl/" + path)
206+
shutil.move('src/snapshots.txt', 'src/snapshots-old.txt')
207+
208+
newf = open('src/snapshots.txt', 'w')
209+
newf.write("T %(year)s-%(month)s-%(date)s %(check)s\n" % parts)
210+
newf.write(" %(plat)s-%(arch)s %(sha)s\n\n" % parts)
211+
212+
oldf = open('src/snapshots-old.txt', 'r')
213+
for line in oldf:
214+
newf.write(line)
215+
oldf.close()
216+
217+
newf.close()
218+
219+
os.remove('src/snapshots-old.txt')
220+
221+
193222
return file1

0 commit comments

Comments
 (0)