-
Couldn't load subscription status.
- Fork 471
Add playground upload script for KEYCDN publishing #5618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits Select commit Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| #/usr/bin/sh | ||
| | ||
| SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd -P) | ||
| | ||
| # Get the actual version from the compiled playground bundle | ||
| VERSION=$(cd $SCRIPT_DIR; node -e 'require("./compiler.js"); console.log(rescript_compiler.make().rescript.version)') | ||
| | ||
| if [ -z "${KEYCDN_USER}" ]; then | ||
| echo "KEYCDN_USER environment variable not set. Make sure to set the environment accordingly." | ||
| exit 1 | ||
| fi | ||
| | ||
| if [ -z "${KEYCDN_PASSWORD}" ]; then | ||
| echo "KEYCDN_PASSWORD environment variable not set. Make sure to set the environment accordingly." | ||
| exit 1 | ||
| fi | ||
| | ||
| KEYCDN_SRV="ftp.keycdn.com" | ||
| NETRC_FILE="${SCRIPT_DIR}/.netrc" | ||
| | ||
| | ||
| # To make sure to not leak any secrets in the bash history, we create a NETRC_FILE | ||
| # with the credentials provided via ENV variables. | ||
| if [ ! -f "${NETRC_FILE}" ]; then | ||
| echo "No .netrc file found. Creating file '${NETRC_FILE}'" | ||
| echo "machine ${KEYCDN_SRV} login $KEYCDN_USER password $KEYCDN_PASSWORD" > "${NETRC_FILE}" | ||
| fi | ||
| | ||
| PACKAGES=( "@rescript/react") | ||
| | ||
| echo "Uploading compiler.js file..." | ||
| curl --ftp-create-dirs -T "${SCRIPT_DIR}/compiler.js" --ssl --netrc-file $NETRC_FILE ftp://${KEYCDN_SRV}/v${VERSION}/compiler.js | ||
| | ||
| echo "---" | ||
| echo "Uploading packages cmij files..." | ||
| for dir in ${PACKAGES[@]}; | ||
| do | ||
| SOURCE="${SCRIPT_DIR}/packages/${dir}" | ||
| TARGET="ftp://${KEYCDN_SRV}/v${VERSION}/${dir}" | ||
| | ||
| echo "Uploading '$SOURCE/cmij.js' to '$TARGET/cmij.js'..." | ||
| | ||
| curl --ftp-create-dirs -T "${SOURCE}/cmij.js" --ssl --netrc-file $NETRC_FILE "${TARGET}/cmij.js" | ||
| done | ||
| | ||
| | ||
| | ||
| |
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first few sentences are outdated. cmjbrowser doesn't exist anymore and I currently have no idea how the builtin_datasets files are created. For now I will keep the outdated infos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would only keep info that is strictly necessary.