Fix micro not recognizing build version
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Github repository
|
||||||
|
REPO="zyedidia/micro"
|
||||||
|
|
||||||
|
# Get tag name using Github Rest API
|
||||||
|
TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
|
||||||
|
|
||||||
|
# Get version number from tag name
|
||||||
|
VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev)
|
||||||
|
|
||||||
|
# Trim 'v' character in VERSION variable
|
||||||
|
VERSION=$(echo "$VERSION" | tr -d 'v')
|
||||||
|
|
||||||
|
echo "$VERSION"
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: micro
|
name: micro
|
||||||
description: A modern and intuitive terminal-based text editor
|
description: A modern and intuitive terminal-based text editor
|
||||||
version: 2.0.14
|
version: 2.0.14
|
||||||
revision: 2
|
revision: 3
|
||||||
url: https://micro-editor.github.io/
|
url: https://micro-editor.github.io/
|
||||||
license: MIT
|
license: MIT
|
||||||
architecture: any
|
architecture: any
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ prepare() {
|
|||||||
# The build function is executed in the source directory
|
# The build function is executed in the source directory
|
||||||
# This function is used to compile the source code
|
# This function is used to compile the source code
|
||||||
build() {
|
build() {
|
||||||
make
|
make VERSION="$BPM_PKG_VERSION"
|
||||||
}
|
}
|
||||||
|
|
||||||
# The check function is executed in the source directory
|
# The check function is executed in the source directory
|
||||||
|
|||||||
Reference in New Issue
Block a user