Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
sudo bash build.sh -s jammy -v raw -a all
sudo bash build.sh -s kinetic -v raw -a all
sudo bash build.sh -s lunar -v raw -a all
sudo bash build.sh -s focal -v raw -a all

- name: upload artifacts
uses: actions/upload-artifact@v3
Expand Down
21 changes: 11 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ msg() { echo -e "${*} \e[0m" >&2;:;}
# DEFAULTS
ARCH="all"
VARIENT="raw"
UD_ROOT_DIR=$(git rev-parse --show-toplevel)

function build() {
# load suites
_avalible_suites="$(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')"
_avalible_suites="$(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' ')"

# check is SUITE avalible in ./suites
if [[ ! ${_avalible_suites} =~ $SUITE ]]; then
die "$SUITE not found in ./suites"
fi

# load avalible varients
_avalible_varients=$(find ./suites/"$SUITE" -type f | cut -d / -f 4 | awk 'NF')
_avalible_varients=$(find ./suites/"$SUITE" -type d | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' ')

# check is varient script avalible
if [[ ! ${_avalible_varients} =~ $VARIENT ]]; then
Expand All @@ -56,19 +57,19 @@ function build() {
msg "SUITE=$SUITE"
msg "Varient=$VARIENT"
msg "ARCH=$ARCH"
cd fs-cook || die "failed to cd ./fs-cook" # script need to executed from fs-cook root directory

# pre-exe task
# copy everything in name $VARIENT-* to fs-cook
cp -r ../suites/"$SUITE"/"$VARIENT"-* ./
bash ../suites/"$SUITE"/"$VARIENT".sh "$ARCH"
cp -r ./suites/$SUITE/$VARIENT/$VARIENT* fs-cook
cd fs-cook || die "Failed to cd.."
bash $VARIENT.sh $ARCH || die "build script failed"
cd $UD_ROOT_DIR || die "Failed fto cd "
rm -rf fs-cook/$VARIENT*
}

function _list() {
for _suite in $(find ./suites -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do
for _suite in $(find ./suites -maxdepth 1 -type d ! -name '*-*' | cut -d / -f 3 | awk 'NF' | uniq -u | tr '\n' ' '); do
echo "[SUITE] $_suite"
for _varient in $(find ./suites/"$_suite" -type f ! -name '*-*' | cut -d / -f 4 | awk 'NF'); do
echo -e "\t -$_varient" | cut -d . -f 1
for _varient in $(find ./suites/"$_suite" -type d ! -name '*-*' | cut -d / -f 4 | awk 'NF' | uniq -u | tr '\n' ' '); do
echo -e "\t -$_varient"
done
done
}
Expand Down
2 changes: 1 addition & 1 deletion suites/hirsute/raw.sh → suites/focal/raw/raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export ENABLE_EXIT
export ENABLE_USER_SETUP
export INCLUDE_PACKAGES

SUITE="hirsute"
SUITE="focal"
frn="out/$SUITE-raw"
OVERRIDER_COMPRESSION_TYPE="gzip"
ENABLE_EXIT=true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.