ci/release: Full docs
This commit is contained in:
parent
0cd0bdc96a
commit
d8b54c2e42
6 changed files with 57 additions and 21 deletions
|
|
@ -1,3 +1,47 @@
|
||||||
# release
|
# release
|
||||||
|
|
||||||
Run `./release.sh --help` for instructions.
|
## _install.sh
|
||||||
|
|
||||||
|
The template for the install script in the root of the repository.
|
||||||
|
|
||||||
|
### gen_install.sh
|
||||||
|
|
||||||
|
Generates the install.sh script in the root of the repository by prepending the libraries
|
||||||
|
it depends on from ../sub/lib.
|
||||||
|
|
||||||
|
## release.sh
|
||||||
|
|
||||||
|
- ./release.sh is the top level script to generate a new release.
|
||||||
|
Run with --help for usage.
|
||||||
|
|
||||||
|
## build.sh
|
||||||
|
|
||||||
|
- ./build.sh builds the release archives for each platform into ./build/<VERSION>/*.tar.gz
|
||||||
|
Run with --help for usage.
|
||||||
|
|
||||||
|
> note: Remember for production releases you need to set the $TSTRUCT_OS_ARCH_BUILDER
|
||||||
|
> variables as we must compile d2 directly on each release target to include dagre.
|
||||||
|
> See https://github.com/terrastruct/d2/issues/31
|
||||||
|
|
||||||
|
### build_docker.sh
|
||||||
|
|
||||||
|
Helper script called by build.sh to build D2 on each linux runner inside Docker.
|
||||||
|
The Dockerfile is in ./builders/Dockerfile
|
||||||
|
|
||||||
|
### _build.sh
|
||||||
|
|
||||||
|
Called by build.sh (with --local or macOS) or build_docker.sh (on linux) to create the
|
||||||
|
release archive.
|
||||||
|
|
||||||
|
Do not invoke directly. If you want to produce a build for a single platform run build.sh
|
||||||
|
as so:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# To only build the linux-amd64 release.
|
||||||
|
./build.sh --run=linux-amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# To only build the linux-amd64 release locally.
|
||||||
|
./build.sh --local --run=linux-amd64
|
||||||
|
```
|
||||||
|
|
|
||||||
5
ci/release/_install.sh
Executable file
5
ci/release/_install.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
$LOG_SH
|
||||||
|
$RAND_SH
|
||||||
|
|
@ -27,17 +27,6 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
unset FLAG \
|
|
||||||
FLAGRAW \
|
|
||||||
FLAGARG \
|
|
||||||
FLAGSHIFT \
|
|
||||||
VERSION \
|
|
||||||
BUILD_DIR \
|
|
||||||
HW_BUILD_DIR \
|
|
||||||
REBUILD \
|
|
||||||
LOCAL \
|
|
||||||
DRYRUN \
|
|
||||||
ARCHIVE
|
|
||||||
VERSION="$(git_describe_ref)"
|
VERSION="$(git_describe_ref)"
|
||||||
BUILD_DIR="ci/release/build/$VERSION"
|
BUILD_DIR="ci/release/build/$VERSION"
|
||||||
while :; do
|
while :; do
|
||||||
|
|
@ -62,6 +51,10 @@ main() {
|
||||||
DRYRUN=1
|
DRYRUN=1
|
||||||
shift "$FLAGSHIFT"
|
shift "$FLAGSHIFT"
|
||||||
;;
|
;;
|
||||||
|
run)
|
||||||
|
flag_reqarg
|
||||||
|
JOB_FILTER="$FLAGARG"
|
||||||
|
shift "$FLAGSHIFT"
|
||||||
'')
|
'')
|
||||||
shift "$FLAGSHIFT"
|
shift "$FLAGSHIFT"
|
||||||
break
|
break
|
||||||
|
|
|
||||||
2
ci/release/gen_install.sh
Executable file
2
ci/release/gen_install.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
@ -63,14 +63,6 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
unset FLAG \
|
|
||||||
FLAGRAW \
|
|
||||||
FLAGARG \
|
|
||||||
FLAGSHIFT \
|
|
||||||
VERSION \
|
|
||||||
REBUILD \
|
|
||||||
PRERELEASE \
|
|
||||||
DRYRUN
|
|
||||||
while :; do
|
while :; do
|
||||||
flag_parse "$@"
|
flag_parse "$@"
|
||||||
case "$FLAG" in
|
case "$FLAG" in
|
||||||
|
|
|
||||||
2
ci/sub
2
ci/sub
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3be3f2345e3cd75f2570afdcebfdf2d3732e5dda
|
Subproject commit 5d23dec92cee36692bc8c8cece74890cce9631e4
|
||||||
Loading…
Reference in a new issue