Skip to content
This repository was archived by the owner on Oct 10, 2022. It is now read-only.

Commit 3ca6238

Browse files
authored
Remove docker update (speedup builds); try to find relative PR with message when creating releases (#73)
1 parent 973275c commit 3ca6238

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

scripts/release-travis.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,33 @@
1212
release_body = os.environ['TRAVIS_COMMIT_MESSAGE']
1313
commit_id = os.environ['TRAVIS_COMMIT']
1414

15+
pr = None
16+
1517
pr_number = os.environ.get('TRAVIS_PULL_REQUEST', 'false')
1618
if pr_number and pr_number != 'false':
1719
try:
1820
pr = repo.get_pull(int(pr_number))
19-
print(pr)
20-
print(pr.title)
21-
print(pr.body)
22-
release_body='''# {}
21+
except ValueError:
22+
pass
23+
24+
if not pr:
25+
all_pulls = [pr for pr in repo.get_pulls(state='closed', sort='updated')]
26+
all_pulls.reverse()
27+
for merged_pr in all_pulls:
28+
if pr.merge_commit_sha == commit_id:
29+
pr = merged_pr
30+
31+
32+
33+
if pr:
34+
release_body='''# {}
2335
{}
2436
2537
## Commit message:
2638
```
2739
{}
2840
```
2941
'''.format(pr.title, pr.body, release_body)
30-
print(release_body)
31-
except ValueError:
32-
pass
3342

3443
release = None
3544
try:

scripts/travis/before_install

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22
set -e
33
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
4-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
5-
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
6-
sudo apt-get update
7-
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
8-
sudo systemctl restart docker
4+
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
5+
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
6+
# sudo apt-get update
7+
# sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
8+
# sudo systemctl restart docker
99
docker --version
1010
current_arch="$(uname -i)"
1111
if [ "$current_arch" != "${IMAGE_ARCH}" ]; then

0 commit comments

Comments
 (0)