Skip to content

Commit

Permalink
Update unypkg-go-build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
michacassola committed Jun 9, 2024
1 parent 2e872a6 commit 0c3c824
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions unypkg-go-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,24 @@ mkdir -pv /uny/sources
cd /uny/sources || exit

pkgname="go"
pkggit="https://github.com/go/go.git refs/tags/*"
pkggit="https://github.com/golang/go.git refs/tags/go*"
gitdepth="--depth=1"

### Get version info from git remote
# shellcheck disable=SC2086
latest_head="$(git ls-remote --refs --tags --sort="v:refname" $pkggit | grep -E "v[0-9.]+$" | tail --lines=1)"
latest_ver="$(echo "$latest_head" | grep -o "v[0-9.].*" | sed "s|v||")"
latest_head="$(git ls-remote --refs --tags --sort="v:refname" $pkggit | grep -E "go[0-9.]+$" | tail --lines=1)"
latest_ver="$(echo "$latest_head" | grep -o "go[0-9.].*" | sed "s|go||")"
latest_commit_id="$(echo "$latest_head" | cut --fields=1)"

version_details

# Release package no matter what:
echo "newer" >release-"$pkgname"

git_clone_source_repo
wget -O- https://go.dev/dl/go"$latest_ver".linux-amd64.tar.gz | tar xfz -
mv go go-"$latest_ver"

#git_clone_source_repo
#cd "$pkgname" || exit
#./autogen.sh
#cd /uny/sources || exit
Expand All @@ -75,14 +77,7 @@ get_include_paths
####################################################
### Start of individual build script
unset LD_RUN_PATH
./configure \
--prefix=/uny/pkg/"$pkgname"/"$pkgver"
make -j"$(nproc)"
make -j"$(nproc)" check
make -j"$(nproc)" install
install -d /uny/pkg/"$pkgname"/"$pkgver" go-*
####################################################
### End of individual build script
Expand Down

0 comments on commit 0c3c824

Please sign in to comment.