Skip to content

Commit d00e1f9

Browse files
committed
add diff tools
1 parent 4d1c420 commit d00e1f9

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

port/linux/release_diff.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import os
2+
import git
3+
import sys
4+
from release_helper import *
5+
6+
repo = git.Repo(REPO_PATH)
7+
commit_head = repo.head.commit.hexsha
8+
pkgReleases = PackageReleaseList(PACKAGE_RELEASE_PATH)
9+
10+
# argv[1] is the commit hash
11+
if len(sys.argv) > 1:
12+
commit_diff = sys.argv[1]
13+
else:
14+
print("No commit hash specified")
15+
commit_diff = "f8b529a956da57d8623247bea594e65469cac1c5"
16+
17+
# checkout to the commit_diff
18+
repo.git.checkout(commit_diff)
19+
pkgReleases_diff = PackageReleaseList(PACKAGE_RELEASE_PATH)
20+
21+
# checkout master
22+
repo.git.checkout("master")
23+
24+
# find new released package and package version
25+
for pkg in pkgReleases.packages:
26+
# find pkg in pkgReleases_diff
27+
pkg_diff = pkgReleases_diff.findPackage(pkg.name)
28+
if None == pkg_diff:
29+
# print("New package: " + pkg.name + pkg.latestVersion().version)
30+
print(f"|{pkg.name}| Create | {pkg.latestVersion().version}|")
31+
continue
32+
33+
pkg_diff = pkgReleases_diff.findPackage(pkg.name)
34+
if pkg_diff.latestVersion().version != pkg.latestVersion().version:
35+
print(
36+
f"|{pkg.name}| Update | {pkg_diff.latestVersion().version} --> {pkg.latestVersion().version}|")
37+
38+
exit()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy