@@ -36,29 +36,33 @@ jobs:
36
36
run : gh release download $TAG_NAME --repo $REPOSITORY --pattern $ASSET_NAME.zip --dir $TEMP_ASSET_DIR
37
37
- name : Asset Placement
38
38
env :
39
+ ASSET_DIR : monitoring
39
40
START_POINTER : " # GENERATED MONITORING RESOURCES START"
40
41
END_POINTER : " # GENERATED MONITORING RESOURCES END"
41
- TARGET_DIR : ydb/core/viewer/monitoring
42
- YA_MAKE_FILE : ydb/core/viewer/ya.make
42
+ WORKING_DIR : ydb/core/viewer
43
43
run : |
44
- unzip $TEMP_ASSET_DIR/$ASSET_NAME.zip -d $TEMP_ASSET_DIR
45
- rm -rf $TARGET_DIR
46
- mkdir $TARGET_DIR
47
- mv -vf $TEMP_ASSET_DIR/$ASSET_NAME/* $TARGET_DIR
44
+ set -e
48
45
46
+ unzip $TEMP_ASSET_DIR/$ASSET_NAME.zip -d $TEMP_ASSET_DIR
47
+
48
+ cd $WORKING_DIR
49
+ rm -rf $ASSET_DIR
50
+ mkdir $ASSET_DIR
51
+ mv -vf $TEMP_ASSET_DIR/$ASSET_NAME/* $ASSET_DIR
52
+
49
53
# List of files in the target directory.
50
- NEW_RESOURCES=$(find $TARGET_DIR -type f | sort)
51
-
54
+ NEW_RESOURCES=$(find $ASSET_DIR -type f | sort)
55
+
52
56
# Current indentation of the start pointer line.
53
- INDENTATION=$(grep -e "$START_POINTER" $YA_MAKE_FILE | perl -lane 's/^(\s+)(.*)+$/$1/e; print')
54
-
57
+ INDENTATION=$(grep -e "$START_POINTER" ya.make | perl -lane 's/^(\s+)(.*)+$/$1/e; print')
58
+
55
59
# Replacing resources list between start and end pointers with saving the current indentation.
56
60
perl -0777 -pi -e "s/\s+$START_POINTER.*$END_POINTER/
57
61
$INDENTATION$START_POINTER
58
62
${INDENTATION}RESOURCE(
59
63
$(echo "$NEW_RESOURCES" | perl -e "while (<>) {chomp; print \"$INDENTATION \$_ \$_\\n\";}" | sed -E 's/\//\\\//g')
60
64
$INDENTATION)
61
- $INDENTATION$END_POINTER/s" $YA_MAKE_FILE
65
+ $INDENTATION$END_POINTER/s" ya.make
62
66
- name : Pull Request
63
67
uses : peter-evans/create-pull-request@v5
64
68
with :
70
74
body : |
71
75
### Embedded UI Refresh
72
76
73
- Embedded UI
74
- [${{ env.TAG_NAME }}](https://github.com/${{ env.REPOSITORY }}/releases/tag/${{ env.TAG_NAME }})
75
- ([CHANGELOG.md](https://github.com/${{ env.REPOSITORY }}/blob/${{ env.TAG_NAME }}/CHANGELOG.md)).
77
+ Embedded UI [${{ env.TAG_NAME }}](https://github.com/${{ env.REPOSITORY }}/releases/tag/${{ env.TAG_NAME }}) ([CHANGELOG.md](https://github.com/${{ env.REPOSITORY }}/blob/${{ env.TAG_NAME }}/CHANGELOG.md)).
0 commit comments