Skip to content

Commit 19e1df2

Browse files
committed
chore(scripts): change dist dir
1 parent 447384f commit 19e1df2

4 files changed

Lines changed: 11 additions & 12 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Network Trash Folder
4444
Temporary Items
4545
.apdisk
4646

47-
toCopy/
47+
_dist/
4848
out/
4949
Chart.lock
5050
*.tgz

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ ci-master: check prepare-assets
3333

3434
.PHONY: ci-release
3535
ci-release: check prepare-assets push-release release-branch
36-

scripts/prepare-release-assets.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ readonly RED='\033[0;31m'
77
readonly NC='\033[0m' # No Color
88

99
function prepareAssets() {
10-
destination=toCopy/
10+
destination=_dist/
1111

1212
echo "Copy files"
1313

14-
mkdir -p toCopy
14+
mkdir -p _dist
1515

1616
# do not fail if there is no .md file
1717
cp addons/*.md ${destination} 2>/dev/null || true

scripts/push_release.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ if [ -z "$ASSET_UPLOAD_URL" ]; then
2828
fi
2929

3030
# modify index.yaml, add created\digest field
31-
if [ ! -f toCopy/index.yaml ]; then
31+
if [ ! -f _dist/index.yaml ]; then
3232
echo "index.yaml does not exist"
3333
exit 1
3434
fi
3535
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
36-
for FILE in `ls toCopy/*.tgz`; do
37-
sha=$(sha256sum $FILE | awk '{ print $1 }') # FILE Example: toCopy/minio-2023.tgz
38-
FILE=${FILE%%.tgz*} # remove ".tgz", Example: toCopy/minio-2023
39-
addonVersion=${FILE##*toCopy/} # remove "path, Example: minio-2023
36+
for FILE in `ls _dist/*.tgz`; do
37+
sha=$(sha256sum $FILE | awk '{ print $1 }') # FILE Example: _dist/minio-2023.tgz
38+
FILE=${FILE%%.tgz*} # remove ".tgz", Example: _dist/minio-2023
39+
addonVersion=${FILE##*_dist/} # remove "path, Example: minio-2023
4040
addon=${addonVersion%-*} # remove after "-" , Example: minio
4141
version=${addonVersion##*-} # remove before "-", Example: 2023
42-
a=$addon v=$version t=$timestamp yq -i '(.entries.[env(a)][] | select(.version == env(v)) | .created) = env(t)' toCopy/index.yaml
43-
a=$addon v=$version s=$sha yq -i '(.entries.[env(a)][] | select(.version == env(v)) | .digest) = env(s)' toCopy/index.yaml
42+
a=$addon v=$version t=$timestamp yq -i '(.entries.[env(a)][] | select(.version == env(v)) | .created) = env(t)' _dist/index.yaml
43+
a=$addon v=$version s=$sha yq -i '(.entries.[env(a)][] | select(.version == env(v)) | .digest) = env(s)' _dist/index.yaml
4444
done
4545

46-
for FILE in toCopy/*; do
46+
for FILE in _dist/*; do
4747
echo "Uploading asset: $FILE to url: $ASSET_UPLOAD_URL?name=${FILE}"
4848
curl -s --data-binary @${FILE} -H "Content-Type: application/octet-stream" -H "Authorization: token ${GITHUB_TOKEN}" -X POST "$ASSET_UPLOAD_URL?name=$(basename ${FILE})"
4949
done

0 commit comments

Comments
 (0)