diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6d74128..5be3b8b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,16 +19,18 @@ jobs: - template: ci/build-linux.yml - template: ci/deploy.yml -# - job: macOS -# pool: -# vmImage: 'macOS-10.13' -# steps: -# - template: templates/npm-steps.yml # Template reference -# -# - job: Windows -# pool: -# vmImage: 'vs2017-win2016' -# steps: -# - script: echo This script runs before the template's steps, only on Windows. -# - template: templates/npm-steps.yml # Template reference -# - script: echo This step runs after the template's steps. \ No newline at end of file + - job: macOS + pool: + vmImage: 'macOS-10.14' + steps: + - template: ci/test.yml + - template: ci/build-macos.yml + - template: ci/deploy.yml + + - job: Windows + pool: + vmImage: 'vs2019-win2019' + steps: + - template: ci/test.yml + - template: ci/build-win.yml + - template: ci/deploy.yml \ No newline at end of file diff --git a/ci/build-linux.yml b/ci/build-linux.yml index bfcf01a..6fb6721 100644 --- a/ci/build-linux.yml +++ b/ci/build-linux.yml @@ -4,6 +4,6 @@ steps: cd target/release/ tar czf "espanso-linux.tar.gz" espanso cd ../.. - cp target/release/espanso-linux.gz . + cp target/release/espanso-*.gz . ls -la - displayName: "Cargo build and packaging" \ No newline at end of file + displayName: "Cargo build and packaging for Linux" \ No newline at end of file diff --git a/ci/build-macos.yml b/ci/build-macos.yml new file mode 100644 index 0000000..1661f68 --- /dev/null +++ b/ci/build-macos.yml @@ -0,0 +1,15 @@ +steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + addToPath: true + + - script: | + python -m pip install toml click + displayName: Installing python dependencies + + - script: | + python packager.py build + cp target/release/espanso-*.gz . + ls -la + displayName: "Cargo build and packaging for MacOS" \ No newline at end of file diff --git a/ci/build-win.yml b/ci/build-win.yml new file mode 100644 index 0000000..ba7f6e1 --- /dev/null +++ b/ci/build-win.yml @@ -0,0 +1,15 @@ +steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '3.6' + addToPath: true + + - script: | + python -m pip install toml click + displayName: Installing python dependencies + + - script: | + python packager.py build + copy "target\\release\\espanso-win-installer.exe" "espanso-win-installer.exe" + dir + displayName: "Build and packaging for Windows" \ No newline at end of file diff --git a/packager.py b/packager.py index d4a77b0..03e6510 100644 --- a/packager.py +++ b/packager.py @@ -75,7 +75,7 @@ def build_windows(package_info): TARGET_DIR = os.path.join(PACKAGER_TARGET_DIR, "win") os.makedirs(TARGET_DIR, exist_ok=True) - INSTALLER_NAME = f"espanso-win-{package_info.version}" + INSTALLER_NAME = f"espanso-win-installer" # Inno setup shutil.copy("packager/win/modpath.iss", os.path.join(TARGET_DIR, "modpath.iss")) @@ -116,7 +116,7 @@ def build_mac(package_info): os.makedirs(TARGET_DIR, exist_ok=True) print("Compressing release to archive...") - target_name = f"espanso-mac-{package_info.version}.tar.gz" + target_name = f"espanso-mac.tar.gz" archive_target = os.path.abspath(os.path.join(TARGET_DIR, target_name)) subprocess.run(["tar", "-C", os.path.abspath("target/release"),