@@ -43,48 +43,46 @@ jobs:
43
43
git checkout main
44
44
cd -
45
45
46
- - name : Copy and Apply Changes to Create-Hyperweb-App
47
- run : |
48
- rsync -av --exclude='.git' ./ ../create-hyperweb-app/templates/hyperweb/ --delete
49
-
50
- - name : Get Version from package.json
46
+ - name : Get Version from Synced package.json
51
47
id : get_version
52
48
run : |
53
- if [ ! -f ../create-hyperweb-app/cha /package.json ]; then
49
+ if [ ! -f ../create-hyperweb-app/templates/hyperweb /package.json ]; then
54
50
echo "package.json not found!"
55
51
exit 1
56
52
fi
57
- VERSION=$(jq -r .version ../create-hyperweb-app/cha /package.json)
53
+ VERSION=$(jq -r .version ../create-hyperweb-app/templates/hyperweb /package.json)
58
54
echo "version=$VERSION" >> $GITHUB_OUTPUT
59
55
56
+ - name : Copy and Apply Changes to Create-Hyperweb-App
57
+ run : |
58
+ rsync -av --exclude='.git' ./ ../create-hyperweb-app/templates/hyperweb/ --delete
59
+
60
60
- name : Update Version in package.json
61
61
run : |
62
62
cd ../create-hyperweb-app
63
- if [ -f cha /package.json ]; then
63
+ if [ -f templates/hyperweb /package.json ]; then
64
64
# Update the version in package.json (increment or set the value as needed)
65
65
NEW_VERSION="${{ steps.get_version.outputs.version }}"
66
- jq ".version = \"$NEW_VERSION\"" cha/ package.json > tmp.json && mv tmp.json cha /package.json
66
+ jq ".version = \"$NEW_VERSION\"" templates/hyperweb/ package.json > tmp.json && mv tmp.json templates/hyperweb /package.json
67
67
else
68
68
echo "package.json not found!"
69
69
exit 1
70
70
fi
71
71
72
- - name : Get Changelog File
73
- run : |
74
- if [ -f ../create-hyperweb-app/cha/CHANGELOG.md ]; then
75
- cp ../create-hyperweb-app/cha/CHANGELOG.md ../create-hyperweb-app/templates/hyperweb/
76
- else
77
- echo "CHANGELOG.md not found!"
78
- fi
79
-
80
72
- name : Commit and Push Changes
81
73
run : |
82
74
cd ../create-hyperweb-app
75
+ # Get the short commit hash from the hyperweb-boilerplate repository
76
+ SHORT_HASH=$(git -C ../hyperweb-boilerplate rev-parse --short HEAD)
77
+
78
+ # Add changes
83
79
git add .
80
+
81
+ # Check if there are any changes to commit
84
82
if ! git diff-index --quiet HEAD; then
85
- NEW_BRANCH="sync/hyperweb-boilerplate-update-${{ steps.get_version.outputs.version } }-$(date +%Y%m%d%H%M)"
83
+ NEW_BRANCH="sync/hyperweb-boilerplate-update-${SHORT_HASH }-$(date +%Y%m%d%H%M)"
86
84
git checkout -b $NEW_BRANCH
87
- git commit -m "Sync changes from hyperweb-boilerplate for version ${{ steps.get_version.outputs.version } }"
85
+ git commit -m "Sync changes from hyperweb-boilerplate for commit ${SHORT_HASH }"
88
86
git push origin $NEW_BRANCH
89
87
fi
90
88
0 commit comments