-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(update): better commit versioning (#944)
- Loading branch information
Showing
31 changed files
with
118 additions
and
91 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
if filters.contains("nightly") { | ||
let o = req("https://api.github.com/repos/mpv-player/mpv/commits/HEAD").json(); | ||
rpm.global("commit", o.sha); | ||
rpm.global("ver", gh("mpv-player/mpv")); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("mpv-player/mpv")); | ||
if rpm.changed() { | ||
rpm.global("ver", gh("mpv-player/mpv")); | ||
rpm.global("commit_date", date()); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
let req = new_req("https://api.github.com/repos/elementary/switchboard-plug-wallet/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
rpm.global("commit", json(req.get()).sha); | ||
rpm.global("commit", gh_commit("elementary/switchboard-plug-wallet")); | ||
if rpm.changed() { | ||
rpm.global("commit_date", date()); | ||
} |
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
8 changes: 6 additions & 2 deletions
8
anda/desktops/gnome/gnome-shell-extension-pop-shell/update.rhai
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
if filters.contains("nightly") { | ||
rpm.global("commit", get("https://api.github.com/repos/pop-os/shell/commits/HEAD").json().sha); | ||
rpm.global("ver", gh("pop-os/shell")); | ||
rpm.global("commit", gh_commit("pop-os/shell")); | ||
if rpm.changed() { | ||
rpm.global("ver", gh("pop-os/shell")); | ||
rpm.release(); | ||
rpm.global("commit_date", date()); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
rpm.version(get("https://gitlab.com/api/v4/projects/19057685/repository/tags").json_arr()[0].name); | ||
rpm.global("commit", get("https://gitlab.com/api/v4/projects/19057685/repository/commits").json_arr()[0].id); | ||
rpm.version(gitlab_tag("19057685")); | ||
if rpm.changed() { | ||
rpm.global("commit", gitlab_commit("19057685")); | ||
} |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
rpm.version(get("https://gitlab.com/api/v4/projects/17424894/repository/tags").json_arr()[0].name); | ||
rpm.global("commit", get("https://gitlab.com/api/v4/projects/17424894/repository/commits").json_arr()[0].id); | ||
rpm.version(gitlab_tag("17424894")); | ||
if rpm.changed() { | ||
rpm.global("commit", get("https://gitlab.com/api/v4/projects/17424894/repository/commits").json_arr()[0].id); | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
let o = get("https://gitlab.com/api/v4/projects/25716028/repository/tags").json_arr()[0]; | ||
rpm.version(o.name); | ||
rpm.global("commit", get("https://gitlab.com/api/v4/projects/25716028/repository/commits").json_arr()[0].id); | ||
rpm.version(gitlab_tag("25716028")); | ||
if rpm.changed() { | ||
rpm.global("commit", get("https://gitlab.com/api/v4/projects/25716028/repository/commits").json_arr()[0].id); | ||
} |
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://api.github.com/repos/PrismLauncher/PrismLauncher/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
let sha = req.get().json().sha; | ||
rpm.global("commit", sha); | ||
rpm.release(); | ||
let cmake = get("https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/develop/CMakeLists.txt"); | ||
let maj = find("set\\(Launcher_VERSION_MAJOR\\s+(\\d+)\\)", cmake, 1); | ||
let min = find("set\\(Launcher_VERSION_MINOR\\s+(\\d+)\\)", cmake, 1); | ||
rpm.version(`${maj}.${min}^%{snapshot_info}`); | ||
rpm.global("commit", gh_commit("PrismLauncher/PrismLauncher")); | ||
if rpm.changed() { | ||
rpm.release(); | ||
let cmake = get("https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/develop/CMakeLists.txt"); | ||
let maj = find("set\\(Launcher_VERSION_MAJOR\\s+(\\d+)\\)", cmake, 1); | ||
let min = find("set\\(Launcher_VERSION_MINOR\\s+(\\d+)\\)", cmake, 1); | ||
rpm.version(`${maj}.${min}^${date()}.%{snapshot_info}`); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://api.github.com/repos/PrismLauncher/PrismLauncher/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
let sha = req.get().json().sha; | ||
rpm.global("commit", sha); | ||
rpm.release(); | ||
let cmake = get("https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/develop/CMakeLists.txt"); | ||
let maj = find("set\\(Launcher_VERSION_MAJOR\\s+(\\d+)\\)", cmake, 1); | ||
let min = find("set\\(Launcher_VERSION_MINOR\\s+(\\d+)\\)", cmake, 1); | ||
rpm.version(`${maj}.${min}^%{snapshot_info}`); | ||
rpm.global("commit", gh_commit("PrismLauncher/PrismLauncher")); | ||
if rpm.changed() { | ||
rpm.release(); | ||
let cmake = get("https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/develop/CMakeLists.txt"); | ||
let maj = find("set\\(Launcher_VERSION_MAJOR\\s+(\\d+)\\)", cmake, 1); | ||
let min = find("set\\(Launcher_VERSION_MINOR\\s+(\\d+)\\)", cmake, 1); | ||
rpm.version(`${maj}.${min}^${date()}.%{snapshot_info}`); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
if filters.contains("nightly") { | ||
let comp = get("https://raw.githubusercontent.com/nim-lang/Nim/devel/lib/system/compilation.nim"); | ||
let maj = find("\\n\\s*NimMajor.+=\\s*(\\d+)\\n", comp, 1); | ||
let min = find("\\n\\s*NimMinor.+=\\s*(\\d+)\\n", comp, 1); | ||
let pat = find("\\n\\s*NimPatch.+=\\s*(\\d+)\\n", comp, 1); | ||
let v = `${maj}.${min}.${pat}`; | ||
rpm.global("ver", v); | ||
let req = new_req("https://api.github.com/repos/nim-lang/Nim/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
rpm.global("commit", req.get().json().sha); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("nim-lang/Nim")); | ||
if rpm.changed() { | ||
let comp = get("https://raw.githubusercontent.com/nim-lang/Nim/devel/lib/system/compilation.nim"); | ||
let maj = find("\\n\\s*NimMajor.+=\\s*(\\d+)\\n", comp, 1); | ||
let min = find("\\n\\s*NimMinor.+=\\s*(\\d+)\\n", comp, 1); | ||
let pat = find("\\n\\s*NimPatch.+=\\s*(\\d+)\\n", comp, 1); | ||
let v = `${maj}.${min}.${pat}`; | ||
rpm.global("ver", v); | ||
rpm.release(); | ||
rpm.global("commit_date", date()); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://api.github.com/repos/vala-lang/vala-language-server/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
rpm.global("commit", json(req.get()).sha); | ||
rpm.global("verrel", gh("vala-lang/vala-language-server")); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("vala-lang/vala-language-server")); | ||
if rpm.changed() { | ||
rpm.global("commit_date", date()); | ||
rpm.global("verrel", gh("vala-lang/vala-language-server")); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://api.github.com/repos/vala-lang/vala-lint/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
let sha = json(req.get()).sha; | ||
rpm.global("commit", sha); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("vala-lang/vala-lint")); | ||
if rpm.changed() { | ||
rpm.global("commit_date", date()); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://gitlab.gnome.org/api/v4/projects/1551/repository/branches/main"); | ||
let sha = json(req.get()).commit.id; | ||
rpm.global("commit", sha); | ||
rpm.release(); | ||
rpm.global("commit", gitlab_commit("gitlab.gnome.org", "1551", "main")); | ||
if rpm.changed() { | ||
rpm.global("commit_date", date()); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
let o = get("https://gitlab.com/api/v4/projects/24742019/repository/tags").json_arr()[0]; | ||
rpm.global("commit", o.commit.id); | ||
rpm.version(o.name); | ||
if rpm.changed() { | ||
rpm.global("commit", o.commit.id); | ||
} |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
let o = get("https://gitlab.com/api/v4/projects/34230948/repository/tags").json_arr()[0]; | ||
rpm.global("commit", o.commit.id); | ||
rpm.version(o.name); | ||
if rpm.changed() { | ||
rpm.global("commit", o.commit.id); | ||
} |
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
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
if filters.contains("nightly") { | ||
let ghreq = new_req("https://api.github.com/repos/tdlib/td/commits/HEAD"); | ||
ghreq.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
rpm.global("commit", json(ghreq.get()).sha); | ||
let req = new_req("https://raw.githubusercontent.com/tdlib/td/master/CMakeLists.txt"); | ||
let v = find("\nproject\\(TDLib\\s+VERSION\\s+([\\d.]+)\\s+", req.get(), 1); | ||
rpm.global("ver", v); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("tdlib/td")); | ||
if rpm.changed() { | ||
let v = find("\nproject\\(TDLib\\s+VERSION\\s+([\\d.]+)\\s+", gh_rawfile("tdlib/td", "master", "CMakeLists.txt")), 1); | ||
rpm.global("ver", v); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
let md = get("https://raw.githubusercontent.com/OpenAsar/arrpc/main/changelog.md"); | ||
rpm.version(find("(?m)^## v([\\d.]+)", md, 1)); | ||
if rpm.changed() { | ||
rpm.global("commit", gh_commit("OpenAsar/arrpc")); | ||
} |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
let o = get("https://gitlab.com/api/v4/projects/25034025/repository/tags").json_arr()[0]; | ||
let f = rpm.f; | ||
rpm.version(o.name); | ||
// check if changed | ||
if rpm.f != f { | ||
if rpm.changed() { | ||
rpm.global("commit", o.commit.id); | ||
} |
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
%global commit 7cb289b6466b662fdf9f7d7ccc9f3c08a7dc0cac | ||
%global commit_date 240219 | ||
%global shortcommit %(c=%{commit}; echo ${c:0:7}) | ||
%global debug_package %{nil} | ||
%define __os_install_post %{nil} | ||
|
||
Name: avstplg | ||
Version: %shortcommit | ||
Version: %commit_date.%shortcommit | ||
Release: 1%?dist | ||
|
||
License: Apache-2.0 | ||
|
@@ -41,4 +42,4 @@ install -Dm755 avstplg/build/bin/Release/net6.0/avstplg.dll %{buildroot}/%{_libd | |
|
||
%changelog | ||
* Tue Jan 2 2024 infinitebash <[email protected]> | ||
- Initial package. | ||
- Initial package. |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
if filters.contains("nightly") { | ||
let req = new_req("https://api.github.com/repos/thesofproject/avsdk/commits/HEAD"); | ||
req.head("Authorization", `Bearer ${env("GITHUB_TOKEN")}`); | ||
rpm.global("commit", json(req.get()).sha); | ||
rpm.release(); | ||
} | ||
rpm.global("commit", gh_commit("thesofproject/avsdk")); | ||
if rpm.changed() { | ||
rpm.release(); | ||
rpm.global("commit_date", date()); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
if filters.contains("nightly") { | ||
rpm.global("commit", get("https://api.github.com/repos/keylase/nvidia-patch/commits/HEAD").json().sha); | ||
rpm.release(); | ||
rpm.global("commit", gh_commit("keylase/nvidia-patch")); | ||
if rpm.changed() { | ||
rpm.global("commit_date", date()); | ||
rpm.release(); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -32,4 +32,4 @@ install -Dm755 build/host/util/ectool %{buildroot}%{_bindir}/ectool | |
|
||
%changelog | ||
* Tue Jan 2 2024 infinitebash <[email protected]> | ||
- Initial package. | ||
- Initial package. |