-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
200 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ variables: | |
PUBLIC_REPO_URL: [email protected]:ProtonVPN/win-app.git | ||
|
||
stages: | ||
- release | ||
- bot # comes from translations/generator job | ||
- build | ||
- test | ||
|
@@ -179,3 +180,14 @@ i18n-manual-sync-crowdin: | |
variables: | ||
I18N_SYNC_CROWDIN_PROJECT: 'windows-vpn' | ||
extends: .i18n-sync-crowdin-common | ||
|
||
create-release: | ||
image: debian:stable-slim | ||
stage: release | ||
when: manual | ||
only: | ||
refs: | ||
- develop | ||
script: | ||
- apt-get update && apt-get install -y python3 python3-pip git | ||
- python3 ci/release.py |
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
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,64 @@ | ||
import os | ||
import re | ||
|
||
def get_remote_url(): | ||
repository = os.getenv("CI_REPOSITORY_URL", "") | ||
user = f"git:{os.getenv('RELEASE_PAT')}" | ||
(_, url) = repository.split("@") | ||
return f"https://{user}@{url.replace(':', '/')}" | ||
|
||
def configure_git(git_email, git_username): | ||
os.system(f"git config user.email \"{git_email}\"") | ||
os.system(f"git config user.name \"{git_username}\"") | ||
|
||
def checkout_develop(): | ||
os.system("git fetch origin develop:develop") | ||
os.system("git checkout develop") | ||
os.system(f"git remote set-url origin {get_remote_url()}") | ||
|
||
def checkout_branch(name): | ||
os.system(f"git checkout -b {name}") | ||
|
||
def push_branch(name): | ||
os.system(f"git push --set-upstream origin {name}") | ||
|
||
def create_commit(message): | ||
os.system(f"git commit -m \"{message}\"") | ||
|
||
def create_debug_branch(version): | ||
branch = f"debug/{version}" | ||
checkout_branch(branch) | ||
push_branch(branch) | ||
|
||
def create_release_branch(version, commit_message): | ||
checkout_develop() | ||
branch = f"release/{version}" | ||
checkout_branch(branch) | ||
update_app_version(version) | ||
create_commit(commit_message) | ||
push_branch(branch) | ||
|
||
def create_release_and_debug_branches(version): | ||
create_release_branch(version, f"Increase app version to {version}") | ||
create_debug_branch(version) | ||
|
||
def update_app_version(version): | ||
file_path = 'src/GlobalAssemblyInfo.cs' | ||
content = '' | ||
with open(file_path, encoding='latin') as f: | ||
content = f.read() | ||
content = re.sub(r"(AssemblyVersion\(\")([0-9]+\.[0-9]+\.[0-9]+)", rf"\g<1>{version}", content) | ||
content = re.sub(r"(AssemblyFileVersion\(\")([0-9]+\.[0-9]+\.[0-9]+)", rf"\g<1>{version}", content) | ||
with open(file_path, 'w') as f: | ||
f.write(content) | ||
|
||
os.system(f"git add {file_path}") | ||
|
||
version = os.getenv('APP_VERSION') | ||
if version == None: | ||
raise Exception("Missing env variable APP_VERSION") | ||
|
||
configure_git(os.getenv('RELEASE_GIT_EMAIL'), os.getenv('RELEASE_GIT_USERNAME')) | ||
|
||
create_release_and_debug_branches(version) | ||
create_release_branch('9.9.9', f"Build app version 9.9.9 to test {version} installer") |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.89 MB
Setup/wireguard-nt/x86/wireguard.dll → ...tonVPN.Vpn/Resources/32-bit/wireguard.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file renamed
BIN
+1.39 MB
Setup/wireguard-nt/amd64/wireguard.dll → ...tonVPN.Vpn/Resources/64-bit/wireguard.dll
Binary file not shown.
Oops, something went wrong.