File tree Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ while getopts " v:" opt; do
4+ case $opt in
5+ v) version=" $OPTARG "
6+ ;;
7+ \? ) echo " Invalid option -$OPTARG " >&2
8+ exit 1
9+ ;;
10+ esac
11+
12+ case $OPTARG in
13+ -* ) echo " Option $opt needs a valid argument"
14+ exit 1
15+ ;;
16+ esac
17+ done
18+
19+ if [[ -z $version ]]; then
20+ echo " Please provide version using '-v'" ;
21+ exit 1
22+ fi
23+
24+ VERSION=$version
25+ # Set current project root
26+ PROJ_ROOT=$( pwd)
27+
28+ mkdir -p ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION}
29+ rm -rf ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION} /src
30+ mkdir -p ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION} /src
31+ cp -a ${PROJ_ROOT} /vscode/. ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION} /src/
32+ rm -rf ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION} .tar.gz
33+ cd ${PROJ_ROOT} /sagemaker-code-editor
34+ tar -czf code-editor${VERSION} .tar.gz code-editor${VERSION}
35+ cd ${PROJ_ROOT}
36+ cp ${PROJ_ROOT} /sagemaker-code-editor/code-editor${VERSION} .tar.gz ${PROJ_ROOT} /
37+ rm -rf ${PROJ_ROOT} /sagemaker-code-editor
38+ sha256sum ${PROJ_ROOT} /code-editor${VERSION} .tar.gz
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ PROJ_ROOT=$(pwd)
1010printf " \n======== Cleaning out patches ========\n"
1111quilt pop -a
1212
13+ # empty vscode module
14+ printf " \n======== Delete data is vs code module if present ========\n"
15+ rm -rf ${PROJ_ROOT} /vscode/.
16+
1317# re-enable -e to allow exiting on error
1418set -e
1519
@@ -31,6 +35,10 @@ printf "\n======== Applying patches ========\n"
3135printf " \n======== Comment out breaking git config lines in postinstall.js ========\n"
3236sh ${PROJ_ROOT} /scripts/postinstall.sh
3337
38+ # Build tarball for conda feedstock from vscode dir
39+ printf " \n======== Build Tarball for Conda Feedstock ========\n"
40+ bash ${PROJ_ROOT} /scripts/create_code_editor_tarball.sh -v 1.2.0
41+
3442# Copy resources
3543printf " \n======== Copy resources ========\n"
3644sh ${PROJ_ROOT} /scripts/copy-resources.sh
@@ -40,6 +48,6 @@ printf "\n======== Deleting vscode/node_modules ========\n"
4048rm -rf " ${PROJ_ROOT} /vscode/node_modules"
4149
4250# Build the project
43- printf " \n======== Building project in ${PROJ_ROOT} /vscode ========\n"
51+ # printf "\n======== Building project in ${PROJ_ROOT}/vscode ========\n"
4452yarn --cwd " ${PROJ_ROOT} /vscode" install --pure-lockfile --verbose
4553yarn --cwd " ${PROJ_ROOT} /vscode" download-builtin-extensions
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ if [ ! -f "$POSTINSTALL_JS_PATH" ]; then
1616fi
1717
1818# Use sed to comment out the specific lines
19- sed -i ' ' ' /cp\.execSync(' " '" ' git config pull\.rebase merges' " '" ' );/s/^/\/\/ /' " $POSTINSTALL_JS_PATH "
20- sed -i ' ' ' /cp\.execSync(' " '" ' git config blame\.ignoreRevsFile \.git-blame-ignore' " '" ' );/s/^/\/\/ /' " $POSTINSTALL_JS_PATH "
19+ sed -i ' ' ' /cp\.execSync(' " '" ' git config .*);/s/^/\/\/ /' " $POSTINSTALL_JS_PATH "
2120
22- echo " Specified git config lines have been commented out in $POSTINSTALL_JS_PATH ."
21+ echo " Specified git config lines have been commented out in $POSTINSTALL_JS_PATH ."
You can’t perform that action at this time.
0 commit comments