diff options
author | sharkdp <davidpeter@web.de> | 2021-01-10 12:05:48 +0100 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-01-10 14:44:46 +0100 |
commit | faa27ed6e32af215e56775416f918168b0d5971c (patch) | |
tree | 1a5feb44453b644b7b923069c8809fa7472de486 /.github | |
parent | f3227c259e76a537d7abc0f3a5e97dc5a4640618 (diff) |
CICD: simply use 'sed' to extract crate information
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/CICD.yml | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index cca881ee..176d6970 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -100,19 +100,13 @@ jobs: arm-unknown-linux-gnueabihf) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;; aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;; esac - - name: Install 'cargo get' - uses: actions-rs/install@v0.1 - with: - crate: cargo-get - version: latest - use-tool-cache: true - name: Extract crate information shell: bash run: | - echo "PROJECT_NAME=$(cargo get --name)" >> $GITHUB_ENV - echo "PROJECT_VERSION=$(cargo get version --full)" >> $GITHUB_ENV - echo "PROJECT_MAINTAINER=$(cargo get --authors)" >> $GITHUB_ENV - echo "PROJECT_HOMEPAGE=$(cargo get --homepage)" >> $GITHUB_ENV + echo "PROJECT_NAME=$(sed -n 's/^name = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV + echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV + echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV + echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV - name: Initialize workflow variables id: vars shell: bash |