diff --git a/check-version.sh b/check-version.sh index 4b19e4e..1edeea8 100644 --- a/check-version.sh +++ b/check-version.sh @@ -4,6 +4,6 @@ REPO="EnumeratedDev/typer" # Get tag name using Github Rest API -TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[0].name') +TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/tags | jq -r '.[].name' | grep -v 'nightly' | head -n1) echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info index 542a805..87f413f 100644 --- a/pkg.info +++ b/pkg.info @@ -1,8 +1,20 @@ name: typer description: A simple and easy to use text editor written in Go version: 0.2.0 +revision: 2 url: https://github.com/EnumeratedDev/Typer license: MIT +maintainers: + - enumdev@enumerated.dev architecture: any -make_depends: ["git","golang","make","sh","which"] type: source +make_depends: + - golang + - make + - sh + - which +downloads: + - url: https://github.com/EnumeratedDev/typer/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 351e2ac0f68329d02ea71591315660f99cb7b339ac0db60f02f3d36943927381 diff --git a/source.sh b/source.sh index b6e98d3..84ff06d 100644 --- a/source.sh +++ b/source.sh @@ -2,19 +2,11 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -REPO="https://github.com/EnumeratedDev/Typer.git" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - git clone --branch "${BPM_PKG_VERSION}" "$REPO" "$BPM_SOURCE" - cd "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - GO=go make + export GOFLAGS="-modcacherw" + make } # The package function is executed in the source directory @@ -22,5 +14,6 @@ build() { package() { make DESTDIR="$BPM_OUTPUT" PREFIX=/usr SYSCONFDIR=/etc install - install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/stormfetch/LICENSE + # Install package license + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/typer/LICENSE }