From acfdcdbc63ead3328ee98497d0179da10b089f99 Mon Sep 17 00:00:00 2001 From: jeppevinkel Date: Wed, 10 Jul 2024 01:22:12 +0200 Subject: [PATCH 1/2] Fix referral url when subdomain contains `account` This fix should work to grab the base url more consistently when the sub domain includes `account` in the name. --- ts/user.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ts/user.ts b/ts/user.ts index de13f63..d100031 100644 --- a/ts/user.ts +++ b/ts/user.ts @@ -267,9 +267,8 @@ class ReferralCard { set code(c: string) { this._code = c; let url = window.location.href; - for (let split of ["#", "?", "account", "my"]) { - url = url.split(split)[0]; - } + let pathArray = url.split('/'); + url = `${pathArray[0]}//${pathArray[2]}/`; if (url.slice(-1) != "/") { url += "/"; } url = url + "invite/" + this._code; this._url = url; From 6052329c0bf17e748149e69773da6e0b89e3ec88 Mon Sep 17 00:00:00 2001 From: jeppevinkel Date: Wed, 10 Jul 2024 09:07:21 +0200 Subject: [PATCH 2/2] Fix deprecated georeleaser flag Updated the `--skip-publish` flag to the new `--skip=publish` format. --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 47293dd..b843027 100644 --- a/.drone.yml +++ b/.drone.yml @@ -85,7 +85,7 @@ steps: commands: - curl -sL https://git.io/goreleaser > goreleaser - chmod +x goreleaser - - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean + - ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean - wget https://builds.hrfee.pw/upload.py - pip3 install requests - bash -c 'sftp -i /id_rsa2 -o StrictHostKeyChecking=no root@161.97.102.153:/mnt/redoc <<< $"put docs/swagger.json jfa-go.json"' @@ -164,7 +164,7 @@ steps: commands: - curl -sL https://git.io/goreleaser > goreleaser - chmod +x goreleaser - - ./scripts/version.sh ./goreleaser --snapshot --skip-publish --clean + - ./scripts/version.sh ./goreleaser --snapshot --skip=publish --clean trigger: event: