forked from artix/artools
Compare commits
3 Commits
0.31rc1
...
migrate-to
| Author | SHA1 | Date | |
|---|---|---|---|
|
0160524097
|
|||
|
1516ef432e
|
|||
| cc3bd8049c |
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
43
src/lib/pkg/version/version.sh
Normal file
43
src/lib/pkg/version/version.sh
Normal 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
|
||||
}
|
||||
@@ -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"
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user