Remove SNAP from CI packaging as it has to be built on snapcraft servers
This commit is contained in:
parent
b8fbfd6e02
commit
f28fabda47
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -36,4 +36,3 @@ DerivedData
|
||||||
*.snap
|
*.snap
|
||||||
|
|
||||||
venv/
|
venv/
|
||||||
snapcraft.yaml
|
|
|
@ -29,12 +29,6 @@ jobs:
|
||||||
displayName: Setting up docker
|
displayName: Setting up docker
|
||||||
- template: ci/deploy.yml
|
- template: ci/deploy.yml
|
||||||
|
|
||||||
- job: UbuntuSNAP
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-latest'
|
|
||||||
steps:
|
|
||||||
- template: ci/build-snap.yml
|
|
||||||
|
|
||||||
- job: macOS
|
- job: macOS
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-10.14'
|
vmImage: 'macOS-10.14'
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
steps:
|
|
||||||
- task: UsePythonVersion@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: '3.7'
|
|
||||||
addToPath: true
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
python --version
|
|
||||||
python -m pip install toml click
|
|
||||||
displayName: Installing python dependencies
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
sudo snap install snapcraft
|
|
||||||
displayName: Setting up snapcraft
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
python packager.py build --skipcargo
|
|
||||||
displayName: "Building the SNAP"
|
|
||||||
|
|
||||||
- task: DownloadSecureFile@1
|
|
||||||
name: snapcraftlogin
|
|
||||||
displayName: "Downloading snapcraft login"
|
|
||||||
inputs:
|
|
||||||
secureFile: snapcraft.login
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
mkdir .snapcraft
|
|
||||||
cp $(snapcraftlogin.secureFilePath) .snapcraft/snapcraft.cfg
|
|
||||||
displayName: "Installing SNAP credentials"
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
test -f *.snap
|
|
||||||
snapcraft push espanso*.snap --release stable
|
|
||||||
displayName: "Publishing snap to the store"
|
|
21
packager.py
21
packager.py
|
@ -57,8 +57,6 @@ def build(skipcargo):
|
||||||
build_windows(package_info)
|
build_windows(package_info)
|
||||||
elif TARGET_OS == "macos":
|
elif TARGET_OS == "macos":
|
||||||
build_mac(package_info)
|
build_mac(package_info)
|
||||||
elif TARGET_OS == "linux":
|
|
||||||
build_snap(package_info)
|
|
||||||
|
|
||||||
|
|
||||||
def build_windows(package_info):
|
def build_windows(package_info):
|
||||||
|
@ -193,25 +191,6 @@ def build_mac(package_info):
|
||||||
print("Done!")
|
print("Done!")
|
||||||
|
|
||||||
|
|
||||||
def build_snap(package_info):
|
|
||||||
print("Starting packaging process for Snap package...")
|
|
||||||
|
|
||||||
print("Rendering snapcraft template...")
|
|
||||||
with open("packager/linux/snapcraft-template.yaml", "r") as snapcraft_template:
|
|
||||||
content = snapcraft_template.read()
|
|
||||||
|
|
||||||
# Replace variables
|
|
||||||
content = content.replace("{{{app_version}}}", package_info.version)
|
|
||||||
|
|
||||||
with open("snapcraft.yaml", "w") as output_file:
|
|
||||||
output_file.write(content)
|
|
||||||
|
|
||||||
print("Starting snapcraft packaging process...")
|
|
||||||
subprocess.run(["snapcraft"])
|
|
||||||
|
|
||||||
print("Done!")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print("[[ espanso packager ]]")
|
print("[[ espanso packager ]]")
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: espanso
|
name: espanso
|
||||||
version: {{{app_version}}}
|
version: 0.5.1
|
||||||
summary: A Cross-platform Text Expander written in Rust
|
summary: A Cross-platform Text Expander written in Rust
|
||||||
description: |
|
description: |
|
||||||
espanso is a Cross-platform, Text Expander written in Rust.
|
espanso is a Cross-platform, Text Expander written in Rust.
|
Loading…
Reference in New Issue
Block a user