Skip to content

Commit

Permalink
package: simplify versioning
Browse files Browse the repository at this point in the history
Actually, nobody really knows why on earth I was doing that versioning
scheme.
  • Loading branch information
stackmystack committed Sep 5, 2024
1 parent 295d237 commit 44243cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@ jobs:
fail-fast: false
matrix:
platform:
# - linux-arm
# - linux-arm64
- linux-x64
# - linux-x86
- macos-arm64
# - macos-x64

include:
# - { platform: linux-arm , os: ubuntu-latest }
# - { platform: linux-arm64 , os: ubuntu-latest }
- { platform: linux-x64, os: ubuntu-latest }
# - { platform: linux-x86 , os: ubuntu-latest }
- { platform: macos-arm64, os: macos-14 }
# - { platform: macos-x64 , os: macos-12 }
runs-on: ${{ matrix.os }}
env:
PLATFORM: ${{ matrix.platform }}
Expand Down
6 changes: 2 additions & 4 deletions package/deb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ IFS=$'\n\t'
set -vx

arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
version_num=$(git describe --tags --abbrev=0 | sed -E 's/v([0-9]+\.[0-9]+)/\1/')
commit_count=$(git rev-list --count --first-parent HEAD)
version=$(git describe --tags --abbrev=0 | sed -E 's/v([0-9]+\.[0-9]+)/\1/')

version="$version_num.$commit_count"
echo

pkg='tree-sitter-parsers'
pkg_name="$pkg-$version_num-$arch"
pkg_name="$pkg-$version-$arch"
rm -rf "$pkg"

debian="$pkg/DEBIAN"
Expand Down
4 changes: 2 additions & 2 deletions package/zip
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ case "$OSTYPE" in
;;
esac

version_num=$(git describe --tags --abbrev=0 | sed -E 's/v([0-9]+\.[0-9]+)/\1/')
version=$(git describe --tags --abbrev=0 | sed -E 's/v([0-9]+\.[0-9]+)/\1/')

pkg="tree-sitter-parsers"
pkg_name="$pkg-$version_num-$PLATFORM"
pkg_name="$pkg-$version-$PLATFORM"
rm -rf "$pkg"

dst=$pkg
Expand Down

0 comments on commit 44243cb

Please sign in to comment.