Skip to content

Commit

Permalink
👷 See if I can make it work with a shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
segersniels committed Mar 29, 2024
1 parent e14bdf4 commit d2f08fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- run: npm run build:ci --workspace cli
- name: Get current package version
id: current_version
run: echo "version=$(grep '.version =' build.zig.zon | sed 's/.*.version = "\([^"]*\)".*/\1/')" >> $GITHUB_OUTPUT
run: echo "version=$(./scripts/version.sh)" >> $GITHUB_OUTPUT
working-directory: apps/cli
- uses: mukunku/[email protected]
id: check_tag
Expand Down
15 changes: 15 additions & 0 deletions apps/cli/scripts/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

ARCH=$(uname -m)
if [ "${ARCH}" = "arm64" ]; then
ARCH="aarch64"
fi

BIN_DIR=$(find zig-out -type d -name "${ARCH}*" | head -n 1)
BIN="${BIN_DIR}/genmoji"

if [ -f "${BIN}" ]; then
echo $(./$BIN --version | awk -F' ' '{print $3}' | tr -d '"')
else
exit 1
fi

0 comments on commit d2f08fe

Please sign in to comment.