Skip to content
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

[Snyk] Upgrade core-js from 3.3.6 to 3.4.0 #118

Merged
merged 2 commits into from Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
61 changes: 30 additions & 31 deletions ci/branch-validator
Expand Up @@ -16,40 +16,41 @@ function store_env_variables {
function check_branch_name_validity {
branch_name=$1
branch_name_prefix_pattern='([[:alpha:]]+)\/[[:punct:][:alnum:]]+'
snyk_name_prefix='(snyk\-upgrade\-[0-9a-f]{5,40})'
not_semver_prefix_pattern='^docs|ci|chore|test$'
patch_semver_prefix_pattern='^bugfix|fix|hotfix|greenkeeper$'
patch_semver_prefix_pattern='^bugfix|fix|hotfix|greenkeeper|snyk\-upgrade\-[0-9a-f]{5,40}$'
minor_semver_prefix_pattern='^feature$'

[[ "$branch_name" =~ $branch_name_prefix_pattern ]]

branch_name_prefix=${BASH_REMATCH[1]}

echo "=============================================================="
echo "Regex input: ${BASH_REMATCH[0]}"
echo "Branch name prefix: $branch_name_prefix"
echo "=============================================================="

if [[ $branch_name_prefix =~ $not_semver_prefix_pattern ]] || [[ $branch_name_prefix =~ $patch_semver_prefix_pattern ]] || [[ $branch_name_prefix =~ $minor_semver_prefix_pattern ]]; then

if [[ "$CIRCLE_BRANCH" == "master" ]]; then
# git checkout because npm version commands needs working directory clean
git checkout .

if [[ $branch_name_prefix =~ $patch_semver_prefix_pattern ]]; then
echo "auto semver patch for branch $branch_name_prefix"
npm version patch
store_env_variables "PATCH"
elif [[ $branch_name_prefix =~ $minor_semver_prefix_pattern ]]; then
echo "auto semver feature for branch $branch_name_prefix"
npm version minor
store_env_variables "MINOR"
elif [[ $branch_name_prefix =~ $not_semver_prefix_pattern ]]; then
echo "not auto semver for branch $branch_name_prefix"
echo "This merge will be skip production deployment process. You can check the application state on Staging environment."
store_env_variables "NOTSEMVER"
if [[ $branch_name =~ $branch_name_prefix_pattern || $branch_name =~ $snyk_name_prefix ]]; then
branch_name_prefix=${BASH_REMATCH[1]}

echo "=============================================================="
echo "Regex input: ${BASH_REMATCH[0]}"
echo "Branch name prefix: $branch_name_prefix"
echo "=============================================================="

if [[ $branch_name_prefix =~ $not_semver_prefix_pattern ]] || [[ $branch_name_prefix =~ $patch_semver_prefix_pattern ]] || [[ $branch_name_prefix =~ $minor_semver_prefix_pattern ]]; then
if [[ "$CIRCLE_BRANCH" == "master" ]]; then
# git checkout because npm version commands needs working directory clean
git checkout .

if [[ $branch_name_prefix =~ $patch_semver_prefix_pattern ]]; then
echo "auto semver patch for branch $branch_name_prefix"
npm version patch
store_env_variables "PATCH"
elif [[ $branch_name_prefix =~ $minor_semver_prefix_pattern ]]; then
echo "auto semver feature for branch $branch_name_prefix"
npm version minor
store_env_variables "MINOR"
elif [[ $branch_name_prefix =~ $not_semver_prefix_pattern ]]; then
echo "not auto semver for branch $branch_name_prefix"
echo "This merge will be skip production deployment process. You can check the application state on Staging environment."
store_env_variables "NOTSEMVER"
fi
fi
echo "OK! your branch called '$branch_name' use the right convention names"
fi
echo "OK! your branch called '$branch_name' use the right convention names"
else
echo "ERROR: your branch called '$branch_name' does not follow the branch name policies."
fi
Expand All @@ -60,8 +61,6 @@ function check_branch_name_validity {
mkdir ./workspace_variables
touch ./workspace_variables/custom-env-variables

ls -la

if [[ "$CIRCLE_BRANCH" == "master" ]]; then
merge_commit_message_pattern='Merge[[:space:]]+pull[[:space:]]+request[[:space:]]+#[0-9]+[[:space:]]+from[[:space:]]+([[:alpha:]]+)\/([[:punct:][:alnum:]]+)'
last_commit_message=$(git log --oneline --merges -1)
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -35,7 +35,7 @@
"@angular/platform-browser": "^9.0.0-next.14",
"@angular/platform-browser-dynamic": "^9.0.0-next.14",
"@angular/router": "^9.0.0-next.14",
"core-js": "^3.3.5",
"core-js": "^3.4.0",
"hammerjs": "^2.0.8",
"rxjs": "~6.5.3",
"tslib": "^1.10.0",
Expand Down