-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
urlchecker: Extract version from deb for rotating url
- Loading branch information
Showing
4 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ | |
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
import apt_inst | ||
import apt_pkg | ||
import datetime as dt | ||
import zoneinfo | ||
import json | ||
|
@@ -449,6 +451,12 @@ async def extract_appimage_version(appimg_io: t.IO): | |
return kf.get_string(GLib.KEY_FILE_DESKTOP_GROUP, "X-AppImage-Version") | ||
|
||
|
||
def extract_deb_version(deb_io: t.IO): | ||
assert deb_io.name | ||
control = apt_inst.DebFile(deb_io.name).control.extractdata("control") | ||
return apt_pkg.TagSection(control).get("Version") | ||
|
||
|
||
_GITHUB_URL_PATTERN = re.compile( | ||
r""" | ||
^[email protected]: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
app-id: com.google.Chrome | ||
modules: | ||
- name: chrome | ||
sources: | ||
- type: extra-data | ||
filename: chrome.deb | ||
url: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
sha256: "0000000000000000000000000000000000000000000000000000000000000000" | ||
size: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters