From e676a529deb575e1423c0e0cf581cb33f8ae257e Mon Sep 17 00:00:00 2001 From: cophilot Date: Thu, 29 Feb 2024 17:56:18 +0100 Subject: [PATCH] v0.7.0 --- .github/workflows/on_release.yml | 4 ++-- install | 11 +++++++++-- src/version_control.rs | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/on_release.yml b/.github/workflows/on_release.yml index 64f66f8..7923614 100644 --- a/.github/workflows/on_release.yml +++ b/.github/workflows/on_release.yml @@ -34,7 +34,7 @@ jobs: artifacts: | uploads/tpy.exe uploads/tpy - uploads/tpy_macos + uploads/tpy-macos token: ${{ secrets.GITHUB_TOKEN }} body: ${{ steps.changelog_reader.outputs.changes }} @@ -72,7 +72,7 @@ jobs: uses: actions/upload-artifact@v1 with: name: uploads - path: tpy_macos + path: tpy-macos build-windows: runs-on: windows-latest diff --git a/install b/install index f4f906a..4caf560 100755 --- a/install +++ b/install @@ -46,7 +46,11 @@ if [ "$version" = "latest" ]; then json=$(curl -s https://api.github.com/repos/cophilot/templify/releases/latest) # get the tag name of the latest release - version=$(echo $json | grep -Po '"tag_name": "\K.*?(?=")') + if [ "$macOS" = true ]; then + version=$(echo $json | grep -o '"tag_name": ".*"' | cut -d '"' -f4) + else + version=$(echo $json | grep -Po '"tag_name": "\K.*?(?=")') + fi echo "Found version: $version" else echo "Looking for the release with the tag $version..." @@ -62,9 +66,12 @@ fi url=https://github.com/cophilot/templify/releases/download/$version/tpy if [ "$macOS" = true ]; then - url=$url_macos + url="$url-macos" +echo "url: $url" fi +exit 0 + echo "Creating installation directory $homePath..." mkdir -p $homePath/bin diff --git a/src/version_control.rs b/src/version_control.rs index af4fa88..7c1c94d 100644 --- a/src/version_control.rs +++ b/src/version_control.rs @@ -6,7 +6,7 @@ pub fn update(v: String) -> Result<(), Box> { binary_ending = ".exe"; } if env::is_mac() { - binary_ending = "_macos"; + binary_ending = "-macos"; } let mut version = v;