Skip to content

Commit 46d1595

Browse files
committed
[1.5.1] updated info.json, dorelease script ignores travis if missing
1 parent b140b78 commit 46d1595

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

nixio/info.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"VERSION": "1.5.1.dev",
2+
"VERSION": "1.5.1",
33
"STATUS": "Release",
4-
"RELEASE": "1.5.1 Development",
4+
"RELEASE": "1.5.1 Release",
55
"AUTHOR": "Christian Kellner, Adrian Stoewer, Andrey Sobolev, Jan Grewe, Balint Morvai, Achilleas Koutsou",
66
"COPYRIGHT": "2014-2020, German Neuroinformatics Node, Christian Kellner, Adrian Stoewer, Andrey Sobolev, Jan Grewe, Balint Morvai, Achilleas Koutsou",
77
"CONTACT": "[email protected]",
88
"BRIEF": "Python reimplementation of NIXIO (http://g-node.github.io/nix/)",
99
"HOMEPAGE": "https://github.com/G-Node/nixpy"
10-
}
10+
}

scripts/dorelease.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -131,32 +131,33 @@ def update_info(newver):
131131

132132
def update_ci_confs(newver):
133133
change = False
134-
nixbranch = ".".join(newver.split(".")[:-1])
135-
travisfn = os.path.join(gitroot, ".travis.yml")
136-
with open(travisfn) as travisconf:
137-
oldconf = travisconf.readlines()
138-
139-
newconf = []
140-
for line in oldconf:
141-
if "NIX_BRANCH" in line:
142-
line = re.sub("1\.[0-9\.]+[0-9\.a-z]+(dev){0,1}", nixbranch, line)
143-
line = line.replace("master", nixbranch)
144-
newconf.append(line)
145-
146-
diff = diff_lines(oldconf, newconf)
147-
148-
if len(diff) == 0:
149-
print("No changes required in .travis.yml")
150-
wait_for_ret()
151-
else:
152-
print("".join(diff))
153-
print("{}The above changes will be written to .travis.yml{}".format(
154-
red_begin, red_end
155-
))
156-
wait_for_ret()
157-
with open(travisfn, "w") as travisconf:
158-
travisconf.writelines(newconf)
159-
change = True
134+
if os.path.exists(os.path.join(gitroot, ".travis.yml")):
135+
nixbranch = ".".join(newver.split(".")[:-1])
136+
travisfn = os.path.join(gitroot, ".travis.yml")
137+
with open(travisfn) as travisconf:
138+
oldconf = travisconf.readlines()
139+
140+
newconf = []
141+
for line in oldconf:
142+
if "NIX_BRANCH" in line:
143+
line = re.sub("1\.[0-9\.]+[0-9\.a-z]+(dev){0,1}", nixbranch, line)
144+
line = line.replace("master", nixbranch)
145+
newconf.append(line)
146+
147+
diff = diff_lines(oldconf, newconf)
148+
149+
if len(diff) == 0:
150+
print("No changes required in .travis.yml")
151+
wait_for_ret()
152+
else:
153+
print("".join(diff))
154+
print("{}The above changes will be written to .travis.yml{}".format(
155+
red_begin, red_end
156+
))
157+
wait_for_ret()
158+
with open(travisfn, "w") as travisconf:
159+
travisconf.writelines(newconf)
160+
change = True
160161

161162
# Appveyor is currently not building NIX so let's not bother changing
162163

0 commit comments

Comments
 (0)