Compare commits

...

3 Commits

Author SHA1 Message Date
0160524097 set repo topics on migrate 2023-06-23 18:22:50 +02:00
1516ef432e artixpkg repo: show git status if changes 2023-06-23 00:13:57 +02:00
cc3bd8049c artixpkg (#76)
Co-authored-by: Artoo <artoo@artixlinux.org>
Reviewed-on: artix/artools#76
2023-06-22 23:03:49 +02:00
4 changed files with 71 additions and 2 deletions

View File

@@ -63,6 +63,22 @@ migrate_to_yaml() {
.version = env(version) |
.packages = env(pkgs) )' \
-i "${REPO_DB}"
if [[ -n ${GIT_TOKEN} ]]; then
local topic gitname
gitname=$(get_compliant_name "${pkgbase}")
topic="${REPO_MAP[$r]}"
if ! add_topic "${gitname}" "${topic}"; then
warning "failed to set topic: ${topic}"
fi
topic="${r}"
if ! remove_topic "${gitname}" "${topic}"; then
warning "failed to remove topic: ${topic}"
fi
fi
done
git rm -r x86_64
fi

View File

@@ -12,10 +12,11 @@ has_changeset(){
git fetch origin &>/dev/null
if [[ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]]; then
msg2 "remote changes: yes"
msg2 "changes: yes"
git status -sb
return 0
fi
msg2 "remote changes: no"
msg2 "changes: no"
return 1
}

View File

@@ -0,0 +1,43 @@
#!/hint/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
[[ -z ${ARTOOLS_INCLUDE_VERSION_SH:-} ]] || return 0
ARTOOLS_INCLUDE_VERSION_SH=1
set -e
artixpkg_version_usage() {
COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
cat <<- _EOF_
Usage: ${COMMAND} [OPTIONS]
Shows the current version information of artixpkg
OPTIONS
-h, --help Show this help text
_EOF_
}
artixpkg_version_print() {
cat <<- _EOF_
artixpkg @buildtoolver@
_EOF_
}
artixpkg_version() {
while (( $# )); do
case $1 in
-h|--help)
artixpkg_version_usage
exit 0
;;
*)
die "invalid argument: %s" "$1"
;;
esac
done
artixpkg_version_print
}

View File

@@ -22,6 +22,7 @@ usage() {
COMMANDS
repo Pacman database modification for packge update, move etc
git Manage Git packaging repositories and their configuration
version Show artixpkg version information
OPTIONS
-h, --help Show this help text
@@ -67,6 +68,14 @@ while (( $# )); do
artixpkg_git "$@"
exit 0
;;
version|--version|-V)
_ARTOOLS_COMMAND+=" $1"
shift
# shellcheck source=src/lib/pkg/version/version.sh
source "${LIBDIR}"/pkg/version/version.sh
artixpkg_version "$@"
exit 0
;;
*)
die "invalid command: %s" "$1"
;;