Skip to content

Commit

Permalink
Update build_ubuntu.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
darek-margas authored Aug 16, 2024
1 parent 8c19ee6 commit 0d76bb5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:

steps:
- uses: actions/checkout@v3

with:
fetch-depth: 0 # This ensures all history and tags are fetched

- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -29,8 +31,13 @@ jobs:
make test
- name: Prepare package files
run: |
# Get the latest tag
LATEST_TAG=$(git describe --tags --abbrev=0)
# Try to get the latest tag, use a default if none exists
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.1.0")
# If no tag was found, use the short commit hash
if [ "$LATEST_TAG" = "v0.1.0" ]; then
LATEST_TAG=$(git rev-parse --short HEAD)
fi
cd source
mkdir -p debian
Expand Down

0 comments on commit 0d76bb5

Please sign in to comment.