File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,8 @@ cp environment.yml "$TMPDIR/original.yml"
1919cache_layer_dir=" ${CNB_LAYERS_DIR} " /cache
2020mkdir -p " ${cache_layer_dir} "
2121
22- OS=$( uname -s | tr ' [:upper:]' ' [:lower:]' )
23- ARCH=$( uname -m)
24-
25- case " $ARCH " in
26- x86_64) ARCH=amd64 ;;
27- arm64|aarch64) ARCH=arm64 ;;
28- * ) >&2 echo " Unsupported architecture: $ARCH " ; exit 1 ;;
29- esac
22+ OS=" ${CNB_TARGET_OS:- unknown} "
23+ ARCH=" ${CNB_TARGET_ARCH:- unknown} "
3024
3125YQ_FILENAME=" yq_${OS} _${ARCH} "
3226YQ_VERSION=v4.47.1
Original file line number Diff line number Diff line change @@ -3,6 +3,22 @@ set -eo pipefail
33
44echo -e " === 🔧 \033[1mRenku Environment Variables buildpack\033[0m ==="
55
6+ # NOTE: we run platform mismatch check here as this buildpack is always selected
7+ CURRENT_ARCH=" $( uname -m) "
8+ case " ${CURRENT_ARCH} " in
9+ " aarch64" |" arm64" ) CURRENT_ARCH=" arm64" ;;
10+ " amd64" |" x86_64" ) CURRENT_ARCH=" amd64" ;;
11+ * ) >&2 echo " ERROR: Unsupported architecture: ${CURRENT_ARCH} " ;;
12+ esac
13+
14+ if [ -n " ${CNB_TARGET_ARCH:- } " ]; then
15+ if [ " ${CNB_TARGET_ARCH} " != " ${CURRENT_ARCH} " ]; then
16+ >&2 echo " ERROR: current architecture ${CURRENT_ARCH} does not match target architecture ${CNB_TARGET_ARCH} !"
17+ exit 1
18+ fi
19+ fi
20+
21+
622layers_dir=" $1 "
723layer_dir=" ${layers_dir} " /renku-env
824env_dir=" ${layer_dir} " /env.launch
Original file line number Diff line number Diff line change @@ -18,13 +18,7 @@ RSTUDIO_VERSION="2025.09.2-418"
1818OS_CODENAME=jammy # https://posit.co/download/rstudio-server gives jammy regardless of ubuntu version
1919FNAME=" rstudio-$RSTUDIO_VERSION .deb"
2020
21- ARCH=$( uname -m)
22-
23- case " $ARCH " in
24- x86_64) ARCH=amd64 ;;
25- arm64|aarch64) ARCH=arm64 ;;
26- * ) >&2 echo " Unsupported architecture: $ARCH " ; exit 1 ;;
27- esac
21+ ARCH=" ${CNB_TARGET_ARCH:- unknown} "
2822
2923if [ -f " $cache_layer_dir /$FNAME " ]; then
3024 echo " Found rstudio $RSTUDIO_VERSION in $cache_layer_dir skipping download"
Original file line number Diff line number Diff line change @@ -12,7 +12,12 @@ ttyd_layer_dir="${layers_dir}"/ttyd
1212ttyd_bin_dir=" ${ttyd_layer_dir} " /bin
1313mkdir -p " ${ttyd_bin_dir} "
1414
15- ARCH=$( uname -i)
15+ ARCH=" ${CNB_TARGET_ARCH:- unknown} "
16+ case " ${ARCH} " in
17+ " arm64" ) ARCH=" aarch64" ;;
18+ " amd64" ) ARCH=" x86_64" ;;
19+ esac
20+
1621TTYD_VERSION=" 1.7.7"
1722TTYD_URL=" https://github.com/tsl0922/ttyd/releases/download/${TTYD_VERSION} /ttyd.${ARCH} "
1823
Original file line number Diff line number Diff line change @@ -22,12 +22,9 @@ mkdir -p "${execd_layer_dir}"
2222mkdir -p " ${cache_layer_dir} "
2323
2424
25- ARCH=$( uname -m)
26-
27- case " $ARCH " in
28- x86_64) ARCH=x64 ;;
29- arm64|aarch64) ARCH=arm64 ;;
30- * ) >&2 echo " Unsupported architecture: $ARCH " ; exit 1 ;;
25+ ARCH=" ${CNB_TARGET_ARCH:- unknown} "
26+ case " ${ARCH} " in
27+ " amd64" ) ARCH=" x64" ;;
3128esac
3229
3330VSCODIUM_DEFAULT_VERSION=" 1.104.36664"
Original file line number Diff line number Diff line change @@ -8,21 +8,13 @@ LOCATION=$2
88
99OS=" linux"
1010case " $( uname) " in
11- ' Darwin' )
12- OS=' darwin'
13- ;;
14- * ) ;;
11+ ' Darwin' ) OS=' darwin' ;;
1512esac
1613
1714ARCH=" x86_64"
1815case " $( uname -m) " in
19- ' aarch64' )
20- ARCH=' aarch64'
21- ;;
22- ' arm64' )
23- ARCH=' aarch64'
24- ;;
25- * ) ;;
16+ ' aarch64' ) ARCH=' aarch64' ;;
17+ ' arm64' ) ARCH=' aarch64' ;;
2618esac
2719
2820if [[ -z $VERSION ]]; then
You can’t perform that action at this time.
0 commit comments