@adea-ai/app-framework 0.35.0 → 0.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ci/desktop-release.sh
CHANGED
|
@@ -37,8 +37,9 @@ root=$(git rev-parse --show-toplevel)
|
|
|
37
37
|
cd "$root"
|
|
38
38
|
sha=${CI_COMMIT_SHA:-$(git rev-parse HEAD)}
|
|
39
39
|
[ "$sha" = "$(git rev-parse HEAD)" ] || { say "refusing: checkout is not at $sha"; exit 1; }
|
|
40
|
-
# Provenance is checked against origin/main
|
|
41
|
-
#
|
|
40
|
+
# Provenance is checked against origin/main of this project (the framework records the GitLab
|
|
41
|
+
# project as owner/name). The runner's insteadOf rewrite can still put its job token into
|
|
42
|
+
# `git remote get-url`; the framework drops that userinfo. The runner resets the URL per job.
|
|
42
43
|
if [ -n "${CI_PROJECT_URL:-}" ]; then git remote set-url origin "$CI_PROJECT_URL.git"; fi
|
|
43
44
|
git fetch --quiet origin "+refs/heads/main:refs/remotes/origin/main"
|
|
44
45
|
git merge-base --is-ancestor "$sha" refs/remotes/origin/main ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.35.
|
|
1
|
+
{"version":"0.35.2","commit":"ea88dfa77e2e32282d4fe8d1054ba8686f1ad5ea"}
|
|
@@ -39,11 +39,11 @@ async function readSourceVersion(git, sourceSha, path) {
|
|
|
39
39
|
* does not change the identity recorded in new descriptors or in installed apps' feeds.
|
|
40
40
|
*/
|
|
41
41
|
async function originRepository(git) {
|
|
42
|
-
const url = await git([
|
|
42
|
+
const url = (await git([
|
|
43
43
|
"remote",
|
|
44
44
|
"get-url",
|
|
45
45
|
"origin"
|
|
46
|
-
]);
|
|
46
|
+
])).replace(/^https:\/\/[^/@\s]*@(?=(?:github|gitlab)\.com\/)/, "https://");
|
|
47
47
|
const part = "[A-Za-z0-9_.-]+";
|
|
48
48
|
const github = new RegExp(`^(?:https://github\\.com/|git@github\\.com:)(${part}/${part}?)(?:\\.git)?/?$`).exec(url);
|
|
49
49
|
const gitlab = new RegExp(`^(?:https://gitlab\\.com/|git@gitlab\\.com:)(${part}/(?:${part}/)*${part}?)(?:\\.git)?/?$`).exec(url);
|