Skip to content

Commit e22280d

Browse files
committed
Port misc to new goodness
1 parent 96329aa commit e22280d

File tree

6 files changed

+67
-43
lines changed

6 files changed

+67
-43
lines changed

build/build-cproc.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ fi
1818
URL="https://github.com/michaelforney/cproc.git"
1919
BRANCH="master"
2020

21-
REVISION=$(git ls-remote --heads "${URL}" "refs/heads/${BRANCH}" | cut -f 1)
22-
echo "ce-build-revision:${REVISION}"
23-
24-
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
25-
echo "ce-build-status:SKIPPED"
26-
exit
27-
fi
28-
29-
FULLNAME=cproc-${VERSION}-$(date +%Y%m%d)
30-
31-
OUTPUT=${ROOT}/${FULLNAME}.tar.xz
21+
FULLNAME=cproc-${VERSION}-$(date +%Y%m%d).tar.xz
22+
OUTPUT=${ROOT}/${FULLNAME}
3223
S3OUTPUT=
3324
if [[ $2 =~ ^s3:// ]]; then
3425
S3OUTPUT=$2
3526
else
3627
if [[ -d "${2}" ]]; then
37-
OUTPUT=$2/${FULLNAME}.tar.xz
28+
OUTPUT=$2/${FULLNAME}
3829
else
3930
OUTPUT=${2-$OUTPUT}
4031
fi
4132
fi
4233

34+
REVISION=$(git ls-remote --heads "${URL}" "refs/heads/${BRANCH}" | cut -f 1)
35+
echo "ce-build-revision:${REVISION}"
36+
echo "ce-build-output:${OUTPUT}"
37+
38+
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
39+
echo "ce-build-status:SKIPPED"
40+
exit
41+
fi
42+
4343
## From now, no unset variable
4444
set -u
4545

@@ -87,3 +87,4 @@ fi
8787

8888
popd
8989
popd
90+
echo "ce-build-status:OK"

build/build-mrustc.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ BRANCH="${VERSION}"
3232
REVISION=$(git ls-remote --heads "${URL}" "refs/heads/${BRANCH}" | cut -f 1)
3333

3434
echo "ce-build-revision:${REVISION}"
35+
echo "ce-build-output:${OUTPUT}"
3536

3637
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
3738
echo "ce-build-status:SKIPPED"
@@ -61,3 +62,5 @@ tar Jcf "${OUTPUT}" --transform "s,^./,./${FULLNAME}/," ./bin/ ./output/
6162
if [[ -n "${S3OUTPUT}" ]]; then
6263
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
6364
fi
65+
66+
echo "ce-build-status:OK"

build/build-rustc-cg-gcc.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ CG_GCC_URL="https://github.com/antoyo/rustc_codegen_gcc.git"
2424
GCC_REVISION=$(git ls-remote --heads "${GCC_URL}" "refs/heads/${GCC_BRANCH}" | cut -f 1)
2525
CG_GCC_REVISION=$(git ls-remote --heads "${CG_GCC_URL}" "refs/heads/${CG_GCC_BRANCH}" | cut -f 1)
2626

27-
REVISION="cggcc-${CG_GCC_REVISION}-gcc-${GCC_REVISION}"
28-
echo "ce-build-revision:${REVISION}"
29-
30-
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
31-
echo "ce-build-status:SKIPPED"
32-
exit
33-
fi
34-
35-
FULLNAME=rustc-cg-gcc-${VERSION}-$(date +%Y%m%d)
36-
37-
OUTPUT=${ROOT}/${FULLNAME}.tar.xz
27+
FULLNAME=rustc-cg-gcc-${VERSION}-$(date +%Y%m%d).tar.xz
28+
OUTPUT=${ROOT}/${FULLNAME}
3829
S3OUTPUT=
3930
if [[ $2 =~ ^s3:// ]]; then
4031
S3OUTPUT=$2
4132
else
4233
if [[ -d "${2}" ]]; then
43-
OUTPUT=$2/${FULLNAME}.tar.xz
34+
OUTPUT=$2/${FULLNAME}
4435
else
4536
OUTPUT=${2-$OUTPUT}
4637
fi
4738
fi
4839

40+
REVISION="cggcc-${CG_GCC_REVISION}-gcc-${GCC_REVISION}"
41+
echo "ce-build-revision:${REVISION}"
42+
echo "ce-build-output:${OUTPUT}"
43+
44+
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
45+
echo "ce-build-status:SKIPPED"
46+
exit
47+
fi
48+
4949
## From now, no unset variable
5050
set -u
5151

@@ -205,3 +205,5 @@ tar Jcf "${OUTPUT}" --transform "s,^./,./${FULLNAME}/," ./
205205
if [[ -n "${S3OUTPUT}" ]]; then
206206
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
207207
fi
208+
209+
echo "ce-build-status:OK"

build/build-spirv-tools.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ fi
1818
URL="https://github.com/KhronosGroup/SPIRV-Tools.git"
1919
BRANCH="master"
2020

21-
REVISION=$(git ls-remote --heads "${URL}" "refs/heads/${BRANCH}" | cut -f 1)
22-
echo "ce-build-revision:${REVISION}"
23-
24-
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
25-
echo "ce-build-status:SKIPPED"
26-
exit
27-
fi
28-
2921
FULLNAME=SPIRV-Tools-${VERSION}-$(date +%Y%m%d)
30-
31-
OUTPUT=${ROOT}/${FULLNAME}.tar.xz
22+
OUTPUT=${ROOT}/${FULLNAME}
3223
S3OUTPUT=
3324
if [[ $2 =~ ^s3:// ]]; then
3425
S3OUTPUT=$2
3526
else
3627
if [[ -d "${2}" ]]; then
37-
OUTPUT=$2/${FULLNAME}.tar.xz
28+
OUTPUT=$2/${FULLNAME}
3829
else
3930
OUTPUT=${2-$OUTPUT}
4031
fi
4132
fi
4233

34+
REVISION=$(git ls-remote --heads "${URL}" "refs/heads/${BRANCH}" | cut -f 1)
35+
echo "ce-build-revision:${REVISION}"
36+
echo "ce-build-output:${OUTPUT}"
37+
38+
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
39+
echo "ce-build-status:SKIPPED"
40+
exit
41+
fi
42+
4343
## From now, no unset variable
4444
set -u
4545

@@ -62,3 +62,5 @@ if [[ -n "${S3OUTPUT}" ]]; then
6262
fi
6363

6464
popd
65+
66+
echo "ce-build-status:OK"

build/build-tinycc.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@ else
1919
BRANCH=release_${VERSION_UNDERSCORES}
2020
fi
2121

22-
OUTPUT=/root/tinycc-${VERSION}.tar.xz
23-
S3OUTPUT=""
24-
if echo "$2" | grep s3://; then
22+
FULLNAME=tinycc-${VERSION}.tar.xz
23+
OUTPUT=${ROOT}/${FULLNAME}
24+
S3OUTPUT=
25+
if [[ $2 =~ ^s3:// ]]; then
2526
S3OUTPUT=$2
2627
else
27-
OUTPUT=${2-/root/tinycc-${VERSION}.tar.xz}
28+
if [[ -d "${2}" ]]; then
29+
OUTPUT=$2/${FULLNAME}
30+
else
31+
OUTPUT=${2-$OUTPUT}
32+
fi
2833
fi
2934

3035
TINYCC_REVISION=$(git ls-remote --heads ${URL} refs/heads/${BRANCH} | cut -f 1)
3136
REVISION="tinycc-${TINYCC_REVISION}"
3237
LAST_REVISION="${3}"
3338

3439
echo "ce-build-revision:${REVISION}"
40+
echo "ce-build-output:${OUTPUT}"
3541

3642
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
3743
echo "ce-build-status:SKIPPED"
@@ -57,3 +63,5 @@ tar Jcf "${OUTPUT}" --transform "s,^./,./tinycc-${VERSION}/," -C "${STAGING_DIR}
5763
if [[ -n "${S3OUTPUT}" ]]; then
5864
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
5965
fi
66+
67+
echo "ce-build-status:OK"

build/buildcc65.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,25 @@ fi
1212

1313
URL=https://github.com/cc65/cc65.git
1414

15-
OUTPUT=/root/cc65-${VERSION}.tar.xz
16-
S3OUTPUT=""
17-
if echo $2 | grep s3://; then
15+
FULLNAME=cc65-${VERSION}.tar.xz
16+
OUTPUT=${ROOT}/${FULLNAME}
17+
S3OUTPUT=
18+
if [[ $2 =~ ^s3:// ]]; then
1819
S3OUTPUT=$2
1920
else
20-
OUTPUT=${2-/root/cc65-${VERSION}.tar.xz}
21+
if [[ -d "${2}" ]]; then
22+
OUTPUT=$2/${FULLNAME}
23+
else
24+
OUTPUT=${2-$OUTPUT}
25+
fi
2126
fi
2227

2328
CC65_REVISION=$(git ls-remote --heads ${URL} refs/heads/${BRANCH} | cut -f 1)
2429
REVISION="cc65-${CC65_REVISION}"
2530
LAST_REVISION="${3}"
2631

2732
echo "ce-build-revision:${REVISION}"
33+
echo "ce-build-output:${OUTPUT}"
2834

2935
if [[ "${REVISION}" == "${LAST_REVISION}" ]]; then
3036
echo "ce-build-status:SKIPPED"
@@ -45,3 +51,5 @@ tar Jcf ${OUTPUT} --transform "s,^./,./cc65-${VERSION}/," -C ${PREFIX} .
4551
if [[ -n "${S3OUTPUT}" ]]; then
4652
aws s3 cp --storage-class REDUCED_REDUNDANCY "${OUTPUT}" "${S3OUTPUT}"
4753
fi
54+
55+
echo "ce-build-status:OK"

0 commit comments

Comments
 (0)