File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ sudo mv "$azcopy_dir/azcopy" /usr/local/bin/azcopy
2222sudo rm -rf " $azcopy_dir "
2323
2424SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
25- " $SCRIPT_DIR /refreshTools.sh"
25+ LATEST_RELEASE=$( bash " $SCRIPT_DIR /refreshTools.sh" )
26+ LATEST_RELEASE=" $LATEST_RELEASE " WORKSPACE_DIR=" $WORKSPACE_DIR " bash spark-sdk-dist/install-tools.sh services
27+
2628
2729echo " Pre-starting the server and generating the optimized assets"
2830npm run optimize --override
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
4- bash " $SCRIPT_DIR /refreshTools.sh"
4+ LATEST_RELEASE=$( bash " $SCRIPT_DIR /refreshTools.sh" )
5+
6+ bash spark-sdk-dist/repair.sh
7+
8+ LATEST_RELEASE=" $LATEST_RELEASE " WORKSPACE_DIR=" $WORKSPACE_DIR " bash spark-sdk-dist/install-tools.sh services
9+
10+ sudo cp .devcontainer/spark.conf /etc/supervisor/conf.d/
11+
12+ sudo chown node /var/run/
13+ sudo chown -R node /var/log/
14+
15+ supervisord
16+ supervisorctl reread
17+ supervisorctl update
518
619# Check if SNAPSHOT_SAS_URL was passed, if so run hydrate.sh
720if [ -n " $SNAPSHOT_SAS_URL " ]; then
821 WORKSPACE_DIR=" /workspaces/spark-template"
922 SAS_URI=" $SNAPSHOT_SAS_URL " /usr/local/bin/hydrate.sh $WORKSPACE_DIR
1023fi
1124
25+ LATEST_RELEASE=" $RELEASE_ID " WORKSPACE_DIR=" $WORKSPACE_DIR " bash spark-sdk-dist/install-tools.sh sdk
26+
1227# Keep reflog commits "forever"
1328git config gc.reflogExpire 500.years.ago
1429git config gc.reflogExpireUnreachable 500.years.ago
1530
16- sudo cp .devcontainer/spark.conf /etc/supervisor/conf.d/
17-
18- sudo chown node /var/run/
19- sudo chown -R node /var/log/
2031
21- supervisord
22- supervisorctl reread
23- supervisorctl update
2432
2533# Set up post-commit hook and also run the build script to perform a one-time build for static preview
2634ln -fs /usr/local/bin/post-commit .git/hooks/post-commit
2735/usr/local/bin/static-preview-build.sh
36+
37+ LATEST_RELEASE=" $RELEASE_ID " WORKSPACE_DIR=" $WORKSPACE_DIR " bash spark-sdk-dist/install-tools.sh cli
Original file line number Diff line number Diff line change 22
33set -e
44
5- echo " Checking for updates..."
6-
75WORKSPACE_DIR=" /workspaces/spark-template"
86LATEST_RELEASE=$( curl -s https://api.github.com/repos/github/spark-template/releases/latest)
9- echo " New version found. Downloading latest release."
7+ RELEASE_ID=$( echo " $LATEST_RELEASE " | jq -r ' .id' )
8+
109
11- TEMP_DIR=$( mktemp -d)
12- cd $TEMP_DIR
10+ TEMP_DIR=/tmp/spark
11+ rm -rf $TEMP_DIR
12+ mkdir -p $TEMP_DIR
1313
1414DOWNLOAD_URL=$( echo " $LATEST_RELEASE " | jq -r ' .assets[0].url' )
1515curl -L -o dist.zip -H " Accept: application/octet-stream" " $DOWNLOAD_URL "
1616
1717unzip -o dist.zip
1818rm dist.zip
19- DIST_DIR=" spark-sdk-dist"
2019
21- bash spark-sdk-dist/repair.sh
22- LATEST_RELEASE=" $LATEST_RELEASE " DIST_DIR=" $DIST_DIR " WORKSPACE_DIR=" $WORKSPACE_DIR " bash spark-sdk-dist/install-tools.sh
23- rm -rf $TEMP_DIR
20+ echo $RELEASE_ID
You can’t perform that action at this time.
0 commit comments