Skip to content

Commit 767f152

Browse files
committed
generate .meta files for upm-2 branch and bump to 2.0.3
1 parent a92b613 commit 767f152

File tree

2 files changed

+103
-1
lines changed

2 files changed

+103
-1
lines changed

.github/workflows/unity-upm-release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,108 @@ jobs:
5757
cp integrations/Unity/package.json upm-package/
5858
cp -r integrations/Unity/Samples~ upm-package/
5959
60+
- name: Generate .meta files
61+
run: |
62+
generate_meta() {
63+
local file="$1"
64+
local guid
65+
guid=$(echo -n "$file" | md5sum | cut -c1-32)
66+
local ext="${file##*.}"
67+
local meta="${file}.meta"
68+
69+
case "$ext" in
70+
cs)
71+
cat > "$meta" <<ENDMETA
72+
fileFormatVersion: 2
73+
guid: ${guid}
74+
MonoImporter:
75+
serializedVersion: 2
76+
defaultReferences: []
77+
executionOrder: 0
78+
icon: {instanceID: 0}
79+
ENDMETA
80+
;;
81+
jslib|jspre)
82+
cat > "$meta" <<ENDMETA
83+
fileFormatVersion: 2
84+
guid: ${guid}
85+
PluginImporter:
86+
serializedVersion: 2
87+
iconMap: {}
88+
executionOrder: {}
89+
defineConstraints: []
90+
isPreloaded: 0
91+
isOverridable: 0
92+
isExplicitlyReferenced: 0
93+
validateReferences: 1
94+
platformData:
95+
- first:
96+
Any:
97+
second:
98+
enabled: 1
99+
settings: {}
100+
userData:
101+
assetBundleName:
102+
assetBundleVariant:
103+
ENDMETA
104+
;;
105+
asmdef)
106+
cat > "$meta" <<ENDMETA
107+
fileFormatVersion: 2
108+
guid: ${guid}
109+
AssemblyDefinitionImporter:
110+
serializedVersion: 2
111+
userData:
112+
assetBundleName:
113+
assetBundleVariant:
114+
ENDMETA
115+
;;
116+
json)
117+
cat > "$meta" <<ENDMETA
118+
fileFormatVersion: 2
119+
guid: ${guid}
120+
TextScriptImporter:
121+
serializedVersion: 2
122+
userData:
123+
assetBundleName:
124+
assetBundleVariant:
125+
ENDMETA
126+
;;
127+
*)
128+
cat > "$meta" <<ENDMETA
129+
fileFormatVersion: 2
130+
guid: ${guid}
131+
DefaultImporter:
132+
externalObjects: {}
133+
userData:
134+
assetBundleName:
135+
assetBundleVariant:
136+
ENDMETA
137+
;;
138+
esac
139+
}
140+
141+
# Generate .meta for the WebSocket folder
142+
folder_guid=$(echo -n "WebSocket" | md5sum | cut -c1-32)
143+
cat > upm-package/WebSocket.meta <<ENDMETA
144+
fileFormatVersion: 2
145+
guid: ${folder_guid}
146+
folderAsset: yes
147+
DefaultImporter:
148+
externalObjects: {}
149+
userData:
150+
assetBundleName:
151+
assetBundleVariant:
152+
ENDMETA
153+
154+
# Generate .meta for package.json
155+
generate_meta "upm-package/package.json"
156+
157+
# Generate .meta for each file in WebSocket/
158+
for f in upm-package/WebSocket/*; do
159+
generate_meta "$f"
160+
done
161+
60162
- name: Push package directory to subtree
61163
uses: s0/git-publish-subdir-action@develop
62164
env:

integrations/Unity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.endel.nativewebsocket",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP). Events auto-dispatch to the main thread via SynchronizationContext.",
55
"license": "MIT",
66
"repository": {

0 commit comments

Comments
 (0)