mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
obs: pkglib: remove unused option.
Remove unused option. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
0c7b2a82c3
commit
7ccf64ee09
@ -47,7 +47,6 @@ function display_help()
|
|||||||
Options:
|
Options:
|
||||||
|
|
||||||
-l --local-build Build the runtime locally
|
-l --local-build Build the runtime locally
|
||||||
-c --commit-id Build with a given commit ID
|
|
||||||
-b --branch Build with a given branch name
|
-b --branch Build with a given branch name
|
||||||
-p --push Push changes to OBS
|
-p --push Push changes to OBS
|
||||||
-a --api-url Especify an OBS API (e.g. custom private OBS)
|
-a --api-url Especify an OBS API (e.g. custom private OBS)
|
||||||
@ -61,9 +60,9 @@ function display_help()
|
|||||||
Usage examples:
|
Usage examples:
|
||||||
|
|
||||||
$SCRIPT_NAME --local-build --branch staging
|
$SCRIPT_NAME --local-build --branch staging
|
||||||
$SCRIPT_NAME --commit-id a76f45c --push --api-url http://127.0.0.1
|
$SCRIPT_NAME --push --api-url http://127.0.0.1
|
||||||
$SCRIPT_NAME --commit-id a76f45c --push --obs-repository home:userx/repository
|
$SCRIPT_NAME --push --obs-repository home:userx/repository
|
||||||
$SCRIPT_NAME --commit-id a76f45c --push
|
$SCRIPT_NAME --push
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
exit 1
|
exit 1
|
||||||
@ -117,20 +116,7 @@ function get_git_info()
|
|||||||
function set_versions()
|
function set_versions()
|
||||||
{
|
{
|
||||||
local commit_hash="$1"
|
local commit_hash="$1"
|
||||||
|
hash_tag="$commit_hash"
|
||||||
if [ -n "$OBS_REVISION" ]
|
|
||||||
then
|
|
||||||
# Validate input is alphanumeric, commit ID
|
|
||||||
# If a commit ID is provided, override versions.txt one
|
|
||||||
if [ -n "$COMMIT" ] && [[ "$OBS_REVISION" =~ ^[a-zA-Z0-9][-a-zA-Z0-9]{0,40}[a-zA-Z0-9]$ ]]; then
|
|
||||||
hash_tag=$OBS_REVISION
|
|
||||||
elif [ -n "$BRANCH" ]
|
|
||||||
then
|
|
||||||
hash_tag=$commit_hash
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
hash_tag=$commit_hash
|
|
||||||
fi
|
|
||||||
short_hashtag="${hash_tag:0:7}"
|
short_hashtag="${hash_tag:0:7}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,18 +163,16 @@ function local_build()
|
|||||||
|
|
||||||
function checkout_repo()
|
function checkout_repo()
|
||||||
{
|
{
|
||||||
local REPO="$1"
|
local REPO="${1}"
|
||||||
if [ -z "$OBS_WORKDIR" ]
|
if [ -z "${OBS_WORKDIR:-}" ]
|
||||||
then
|
then
|
||||||
# If no workdir is provided, use a temporary directory.
|
OBS_WORKDIR=$(mktemp -d -u -t obs-repo.XXXXXXXXXXX) || exit 1
|
||||||
temp=$(basename $0)
|
osc "${APIURL}" co "${REPO}" -o "${OBS_WORKDIR}"
|
||||||
OBS_WORKDIR=$(mktemp -d -u -t ${temp}.XXXXXXXXXXX) || exit 1
|
|
||||||
osc $APIURL co $REPO -o $OBS_WORKDIR
|
|
||||||
fi
|
fi
|
||||||
find ${OBS_WORKDIR} -maxdepth 1 -mindepth 1 ! -name '.osc' -prune -exec echo remove {} \; -exec rm -rf {} \;
|
find "${OBS_WORKDIR}" -maxdepth 1 -mindepth 1 ! -name '.osc' -prune -exec echo remove {} \; -exec rm -rf {} \;
|
||||||
|
|
||||||
mv ${GENERATED_FILES[@]} "$OBS_WORKDIR"
|
mv "${GENERATED_FILES[@]}" "${OBS_WORKDIR}"
|
||||||
cp ${STATIC_FILES[@]} "$OBS_WORKDIR"
|
cp "${STATIC_FILES[@]}" "$OBS_WORKDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
function obs_push()
|
function obs_push()
|
||||||
@ -206,7 +190,6 @@ function cli()
|
|||||||
case "${1}" in
|
case "${1}" in
|
||||||
-a | --api-url ) APIURL="$2"; shift 2;;
|
-a | --api-url ) APIURL="$2"; shift 2;;
|
||||||
-b | --branch ) BRANCH="true"; OBS_REVISION="$2"; shift 2;;
|
-b | --branch ) BRANCH="true"; OBS_REVISION="$2"; shift 2;;
|
||||||
-c | --commit-id ) COMMIT="true"; OBS_REVISION="$2"; shift 2;;
|
|
||||||
-l | --local-build ) LOCAL_BUILD="true"; shift;;
|
-l | --local-build ) LOCAL_BUILD="true"; shift;;
|
||||||
-p | --push ) OBS_PUSH="true"; shift;;
|
-p | --push ) OBS_PUSH="true"; shift;;
|
||||||
-r | --obs-repository ) PROJECT_REPO="$2"; shift 2;;
|
-r | --obs-repository ) PROJECT_REPO="$2"; shift 2;;
|
||||||
|
Loading…
Reference in New Issue
Block a user