-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update minimum deps & update release process [IDE-356] (#176)
* chore: update minimum dependencies & fix lsp4e interface call * chore: update release process * chore: bump plugin version * chore: update ci.yml github action to use newer actions * fix: use secret for sha check of keystore * refactor: enforce max number of parameters * fix: script output * fix: add recursive flag to aws cp call
- Loading branch information
1 parent
3bbd12e
commit 3470750
Showing
16 changed files
with
139 additions
and
103 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# © 2024 Snyk Limited | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
set -euo pipefail | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
# shellcheck disable=SC2002 | ||
BASE="eclipse" | ||
AWS_REGION="${AWS_REGION:-us-east-1}" | ||
AWS_S3_BUCKET_NAME="${AWS_S3_BUCKET_NAME:-snyk-test}" | ||
DRY_RUN= | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "please provide a release channel as parameter (preview/stable)" | ||
exit 1 | ||
fi | ||
|
||
RELEASE_CHANNEL=$1 | ||
|
||
if [ $# -eq 2 ]; then | ||
DRY_RUN=--dryrun | ||
fi | ||
|
||
if [ $# -gt 2 ]; then | ||
echo "Too many parameters" | ||
echo "Usage: upload-to-s3.sh <release-channel> <dryrun>" | ||
exit 1 | ||
fi | ||
|
||
function uploadFile() { | ||
FILENAME_SRC=$1 | ||
FILENAME_DST=$2 | ||
DRY_RUN=${3:-} | ||
|
||
[ ! -d "$FILENAME_SRC" ] && echo "Directory $FILENAME_SRC does not exist." && exit 1 | ||
|
||
# shellcheck disable=SC2086 | ||
aws s3 cp --recursive $DRY_RUN "$FILENAME_SRC" "s3://$AWS_S3_BUCKET_NAME/$BASE/$FILENAME_DST" | ||
} | ||
|
||
# publish repo | ||
FILENAME_SRC="$SCRIPT_DIR/../update-site/target/repository" | ||
FILENAME_DST="$RELEASE_CHANNEL" | ||
# shellcheck disable=SC2086 | ||
uploadFile $FILENAME_SRC $FILENAME_DST $DRY_RUN |
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
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
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