-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: webclient version and installation method #321
Merged
limhjgrace
merged 10 commits into
aws-observability:main
from
limhjgrace:feature/web-client-versioning
Feb 1, 2023
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5a54bb3
feat: webclient version and installation method
limhjgrace 3a17656
Add package-lock.json
limhjgrace 6a8453d
Update updating version mechanism to be separate script
limhjgrace 55d9a62
Update file path
limhjgrace ccbe9cf
update:version
limhjgrace 3861467
update:version
limhjgrace 7cd4837
update:version
limhjgrace 0f96137
Minor updates based on comments
limhjgrace 2ff1602
Update version
limhjgrace a865afe
Update ci to update version.json
limhjgrace 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 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 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,50 @@ | ||
#!/bin/bash | ||
bucket=$1 | ||
|
||
# exit when any command fails | ||
set -e | ||
|
||
delete_local_file() { | ||
rm -f $versionsFileDir | ||
} | ||
|
||
fileName="versions.csv" | ||
|
||
# if file not found, throws NoSuchKey error | ||
aws s3api get-object --bucket $bucket --key "content/versions.csv" $fileName | ||
|
||
versionsFileDir="./$fileName"; | ||
versions=$(<$versionsFileDir) | ||
|
||
allPairsArr=(${versions}); | ||
|
||
# verify current versions in versions.csv file contain valid client,version pairs | ||
scriptString="arw-script" | ||
moduleString="arw-module" | ||
|
||
for singlePair in "${allPairsArr[@]}"; | ||
do | ||
IFS=',' read -ra singlePairArr <<< "$singlePair" | ||
|
||
if [ ${singlePairArr[0]} != $scriptString ] && [ ${singlePairArr[0]} != $moduleString ] | ||
then | ||
delete_local_file | ||
|
||
echo ERROR: INVALID CLIENT | ||
echo ${singlePairArr[0]} | ||
exit 1 | ||
fi | ||
|
||
if ! [[ ${singlePairArr[1]} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] | ||
then | ||
delete_local_file | ||
|
||
|
||
echo ERROR: INVALID VERSION | ||
echo ${singlePairArr[1]} | ||
exit 1 | ||
fi | ||
|
||
done | ||
|
||
delete_local_file |
This file contains 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 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 |
---|---|---|
|
@@ -9,5 +9,10 @@ | |
{ | ||
"name": "spec" | ||
} | ||
] | ||
], | ||
"compilerOptions": { | ||
"typescript": { | ||
"configPath": "./tsconfig.testcafe.json" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 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
Oops, something went wrong.
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.
suggestion: If we run any of the targets independently, like
npm run build:dist:es
, then the correct version may not be used.This is fine for the deployment script in this repository, because it runs
build
, but there is are scenarios where this step could be missed. For example, a third party runs their own web client build, but runs only the subset they need:build:schemas && build:dist:es
.One way to help mitigate this would be to omit
version.json
from version control (by adding it to.gitignore
). This way, like the schemas,build:version
would need to run before the other build steps, helping ensure the file is up to date.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.
Added to
.gitignore
and removed files from changes