2.0.9 • Published 1 month ago

@xpack-dev-tools/xbb-helper v2.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

license

A source xPack with helper files for the XBB builds

This project provides common scripts and other files useful during xPack Build Box (XBB) builds.

The project is hosted on GitHub as xpack-dev-tools/xbb-helper-xpack.

Maintainer info

This page is addressed to developers who plan to include this package into their own projects.

For maintainer info, please see:

Install

As a source xPack, the easiest way to add it to a project is via xpm, but it can also be used as any Git project, for example as a submodule.

Prerequisites

A recent xpm, which is a portable Node.js command line application.

For details please follow the instructions in the xPack install page.

xpm

This package is available as @xpack-dev-tools/xbb-helper from the npmjs.com registry:

cd my-project
xpm init # Unless a package.json is already present

xpm install --save-dev @xpack-dev-tools/xbb-helper@latest

ls -l xpacks/xpack-dev-tools-xbb-helper

Git submodule

If, for any reason, xpm is not available, the next recommended solution is to link it as a Git submodule below an xpacks folder.

cd my-project
git init # Unless already a Git project
mkdir -p xpacks

git submodule add https://github.com/xpack-dev-tools/xbb-helper-xpack.git \
  xpacks/xpack-dev-tools-xbb-helper

Branches

Apart from the unused master branch, there are two active branches:

  • xpack, with the latest stable version (default)
  • xpack-develop, with the current development version

All development is done in the xpack-develop branch, and contributions via Pull Requests should be directed to this branch.

When new releases are published, the xpack-develop branch is merged into xpack.

Developer info

Overview

This project includes several bash scripts with functions that can be used for common jobs in application builds.

Integration info

There are multiple scripts, but the easiest way is to include scripts/helper.sh.

For common operations, like builds, include scripts/common-build.sh.

Known problems

  • none

Examples

A typical use case is to source the helper and the common-*.sh and invoke it like:

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# This file is part of the xPack distribution.
#   (https://xpack.github.io)
# Copyright (c) 2022 Liviu Ionescu.
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose is hereby granted, under the terms of the MIT license.
# -----------------------------------------------------------------------------

# -----------------------------------------------------------------------------
# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d).

if [[ ! -z ${DEBUG} ]]
then
  set ${DEBUG} # Activate the expand mode if DEBUG is anything but empty.
else
  DEBUG=""
fi

set -o errexit # Exit if command failed.
set -o pipefail # Exit if pipe failed.
set -o nounset # Exit if variable not set.

# Remove the initial space and instead use '\n'.
IFS=$'\n\t'

# -----------------------------------------------------------------------------
# Identify the script location, to reach, for example, the helper scripts.

build_script_path="$0"
if [[ "${build_script_path}" != /* ]]
then
  # Make relative path absolute.
  build_script_path="$(pwd)/$0"
fi

script_folder_path="$(dirname "${build_script_path}")"
script_folder_name="$(basename "${script_folder_path}")"

# =============================================================================

scripts_folder_path="${script_folder_path}"
project_folder_path="$(dirname ${script_folder_path})"
helper_folder_path="${project_folder_path}/xpacks/xpack-dev-tools-xbb-helper"

# -----------------------------------------------------------------------------

source "${scripts_folder_path}/definitions.sh"

source "${helper_folder_path}/scripts/helper.sh"
source "${helper_folder_path}/scripts/common-build.sh"

source "${scripts_folder_path}/versioning.sh"

source "${scripts_folder_path}/dependencies/ninja.sh"

# -----------------------------------------------------------------------------

host_detect

help_message="    bash $0 [--win] [--debug] [--develop] [--jobs N] [--help]"
host_parse_options "${help_message}" "$@"

common_build

exit 0

Change log - incompatible changes

According to semver rules:

Major version X (X.y.z | X > 0) MUST be incremented if any backwards incompatible changes are introduced to the public API.

The incompatible changes, in reverse chronological order, are:

  • v0.x: pre-release versions

Support

For support, please use GitHub Discussions.

License

The original content is released under the MIT License, with all rights reserved to Liviu Ionescu.

2.0.9

1 month ago

2.0.8

1 month ago

2.0.7

2 months ago

2.0.6

3 months ago

2.0.5

5 months ago

2.0.4

5 months ago

1.10.5

9 months ago

1.10.4

9 months ago

1.10.3

9 months ago

1.10.2

9 months ago

1.10.8

8 months ago

1.10.7

9 months ago

1.10.6

9 months ago

1.6.0

9 months ago

2.0.3

5 months ago

2.0.2

6 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.7.5

9 months ago

1.7.4

9 months ago

1.11.2

8 months ago

1.11.1

8 months ago

1.9.0

9 months ago

1.5.2

9 months ago

1.5.1

9 months ago

1.5.0

9 months ago

1.4.11

10 months ago

1.4.10

10 months ago

1.4.13

10 months ago

1.4.12

10 months ago

1.4.15

10 months ago

1.4.14

10 months ago

1.10.1

9 months ago

1.10.0

9 months ago

1.8.1

9 months ago

1.8.0

9 months ago

1.7.3

9 months ago

1.7.2

9 months ago

1.7.1

9 months ago

1.7.0

9 months ago

1.4.9

10 months ago

1.4.8

10 months ago

1.4.7

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.11.39

1 year ago

0.11.38

1 year ago

0.11.37

1 year ago

0.11.36

1 year ago

0.11.35

1 year ago

0.11.34

1 year ago

0.11.33

1 year ago

0.11.32

1 year ago

0.11.31

1 year ago

0.11.30

1 year ago

0.11.29

1 year ago

0.11.28

1 year ago

0.11.27

1 year ago

0.11.26

1 year ago

0.11.25

1 year ago

0.11.24

1 year ago

0.11.23

1 year ago

0.11.22

1 year ago

0.11.21

1 year ago

0.11.20

1 year ago

0.11.19

1 year ago

0.11.18

1 year ago

0.11.17

1 year ago

0.11.16

1 year ago

0.11.15

1 year ago

0.11.14

1 year ago

0.11.13

1 year ago

0.11.11

1 year ago

0.11.10

1 year ago

0.11.9

1 year ago

0.11.8

1 year ago

0.11.7

1 year ago

0.11.6

1 year ago

0.11.5

1 year ago

0.11.4

1 year ago

0.12.0

1 year ago

0.11.3

2 years ago

0.11.2

2 years ago

0.11.1

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.6

2 years ago

0.9.5

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago

0.8.7

2 years ago

0.8.6

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.8.1

2 years ago

0.8.0

2 years ago

0.7.4

2 years ago

0.7.3

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.33

2 years ago

0.5.32

2 years ago

0.5.31

2 years ago

0.5.30

2 years ago

0.5.29

2 years ago

0.5.28

2 years ago

0.5.27

2 years ago

0.5.26

2 years ago

0.5.25

2 years ago

0.5.24

2 years ago

0.5.23

2 years ago

0.5.22

2 years ago

0.5.21

2 years ago

0.5.20

2 years ago

0.5.19

2 years ago

0.5.18

2 years ago

0.5.17

2 years ago

0.5.16

2 years ago

0.5.15

2 years ago

0.5.14

2 years ago

0.5.13

2 years ago

0.5.12

2 years ago

0.5.11

2 years ago

0.5.10

2 years ago

0.5.9

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.6

2 years ago

0.5.5

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago