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 22fb42c commit 221bed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
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 221bed7

Please sign in to comment.