Skip to content

Commit

Permalink
oebb: hook up tag and changelog functionality from layerman
Browse files Browse the repository at this point in the history
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
  • Loading branch information
koenkooi committed Jan 11, 2012
1 parent 41b6c4c commit 87920f5
Showing 1 changed file with 44 additions and 9 deletions.
53 changes: 44 additions & 9 deletions oebb.sh
Expand Up @@ -46,6 +46,8 @@ function set_environment()
# Workaround for differences between yocto bitbake and vanilla bitbake
export BBFETCH2=True

export TAG

#--------------------------------------------------------------------------
# If an env already exists, use it, otherwise generate it
#--------------------------------------------------------------------------
Expand Down Expand Up @@ -224,7 +226,7 @@ function update_oe()
fi

#manage meta-openembedded and meta-angstrom with layerman
${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt
env gawk -v command=update -f ${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt
}


Expand Down Expand Up @@ -309,6 +311,23 @@ _EOF
fi
}

###############################################################################
# tag_layers - Tag all layers with a given tag
###############################################################################
function tag_layers()
{
set_environment
env gawk -v command=tag -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt
}

###############################################################################
# tag_layers - Tag all layers with a given tag
###############################################################################
function changelog()
{
set_environment
env gawk -v command=changelog -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_SOURCE_DIR}/layers.txt
}

###############################################################################
# Build the specified OE packages or images.
Expand All @@ -320,18 +339,34 @@ if [ $# -gt 0 ]
then
if [ $1 = "update" ]
then
shift
if [ ! -r $1 ]; then
if [ $1 == "commit" ]
then
shift
OE_COMMIT_ID=$1
fi
fi
update_all
exit 0
fi

if [ $1 = "tag" ]
then
if [ -n "$2" ] ; then
TAG="$2"
else
TAG="$(date -u +'%Y%m%d-%H%M')"
fi
tag_layers $TAG
exit 0
fi

if [ $1 = "changelog" ]
then
if [ -z $2 ] ; then
echo "Changelog needs an argument"
exit 1
else
TAG="$2"
fi
changelog
exit 0
fi


if [ $1 = "bitbake" ]
then
shift
Expand Down

0 comments on commit 87920f5

Please sign in to comment.