mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
rename "name" var
This commit is contained in:
parent
d90d01fb9a
commit
ba6ae0999b
2 changed files with 8 additions and 8 deletions
|
|
@ -7,13 +7,13 @@
|
|||
# usage: source <script> <name> [--get] [--build] [--save] [--interactive] [--set-cache <location>]
|
||||
# <name> sets the name of the docker image, these correspond to directories in .ci
|
||||
# --get loads the image from a previously saved image cache, will build if no image is found
|
||||
# --build builds the image from the Dockerfile in .ci/$NAME
|
||||
# --build builds the image from the Dockerfile in .ci/$BUILD_REFERENCE
|
||||
# --save stores the image, if an image was loaded it will not be stored
|
||||
# --interactive immediately starts the image interactively for debugging
|
||||
# --set-cache <location> sets the location to cache the image or for ccache
|
||||
#
|
||||
# requires: docker
|
||||
# uses env: NAME CACHE BUILD GET SAVE INTERACTIVE
|
||||
# uses env: BUILD_REFERENCE CACHE BUILD GET SAVE INTERACTIVE
|
||||
# (correspond to args: <name> --set-cache <cache> --build --get --save --interactive)
|
||||
# sets env: RUN CCACHE_DIR IMAGE_NAME RUN_ARGS RUN_OPTS BUILD_SCRIPT
|
||||
# exitcode: 1 for failure, 2 for missing dockerfile, 3 for invalid arguments
|
||||
|
|
@ -69,21 +69,21 @@ while [[ $# != 0 ]]; do
|
|||
echo "unrecognized option: $1"
|
||||
return 3
|
||||
fi
|
||||
NAME="$1"
|
||||
BUILD_REFERENCE="$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Setup
|
||||
if ! [[ $NAME ]]; then
|
||||
if ! [[ $BUILD_REFERENCE ]]; then
|
||||
echo "no build name given" >&2
|
||||
return 3
|
||||
fi
|
||||
|
||||
export IMAGE_NAME="${project_name,,}_${NAME,,}" # lower case
|
||||
export IMAGE_NAME="${project_name,,}_${BUILD_REFERENCE,,}" # lower case
|
||||
|
||||
docker_dir=".ci/$NAME"
|
||||
docker_dir=".ci/$BUILD_REFERENCE"
|
||||
if ! [[ -r $docker_dir/Dockerfile ]]; then
|
||||
echo "could not find Dockerfile in $docker_dir" >&2
|
||||
return 2 # even if the image is cached, we do not want to run if there is no way to build this image
|
||||
|
|
|
|||
4
.github/workflows/desktop-build.yml
vendored
4
.github/workflows/desktop-build.yml
vendored
|
|
@ -97,7 +97,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# The files in ".ci/$distro$distro_version" correspond to the values given here
|
||||
# The files in ".ci/$BUILD_REFERENCE" correspond to the values given here
|
||||
include:
|
||||
- distro: Arch
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ jobs:
|
|||
CCACHE_EVICTION_AGE: 7d
|
||||
CCACHE_SIZE: 550M # space of all repo is 10Gi: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||
CMAKE_GENERATOR: Ninja
|
||||
NAME: ${{ matrix.distro }}${{ matrix.distro_version }}
|
||||
BUILD_REFERENCE: ${{ matrix.distro }}${{ matrix.distro_version }}
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue