Skip to content

Commit d68cd5b

Browse files
authored
Merge pull request #148 from firebase/version_workflow
Fix the issue that no EDM4U is packaged
2 parents 39954e9 + a735ebe commit d68cd5b

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

.github/workflows/integration_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,16 @@ jobs:
185185
uses: dawidd6/action-download-artifact@v2
186186
if: ${{ github.event.inputs.test_packaged_sdk != '' }}
187187
with:
188-
name: 'firebase_unity_sdk'
188+
name: 'firebase_unity_sdk.zip'
189189
workflow: 'packaging.yml'
190190
run_id: ${{ github.event.inputs.test_packaged_sdk }}
191-
path: firebase_unity_sdk
191+
192192
- name: Build integration tests
193193
timeout-minutes: 220
194194
shell: bash
195195
run: |
196196
if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then
197-
mv -v firebase_unity_sdk ~/Downloads/
197+
unzip -q firebase_unity_sdk.zip -d ~/Downloads/
198198
else
199199
if [[ -z "${{ github.event.inputs.sdk_url }}" ]];then
200200
sdk_url="https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.5.0.zip"

.github/workflows/package.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,13 @@ jobs:
101101
run: |
102102
cd built_artifect
103103
find . -type f -name "*.zip" -exec mv {} . \;
104-
ls -l
104+
find . -empty -type d -delete
105+
ls -lR
106+
for zip_file in *.zip
107+
do
108+
unzip -l $zip_file
109+
done
110+
ls -lR
105111
cd ..
106112
107113
- name: Package unitypackage
@@ -161,10 +167,11 @@ jobs:
161167
162168
- name: Create Zip File
163169
run: |
164-
cp docs/readme.md output/.
165-
cp LICENSE output/.
166-
ls -Rl output
167-
zip -r firebase_unity_sdk.zip output
170+
mv output firebase_unity_sdk
171+
cp docs/readme.md firebase_unity_sdk/.
172+
cp LICENSE firebase_unity_sdk/.
173+
ls -Rl firebase_unity_sdk
174+
zip -r firebase_unity_sdk.zip firebase_unity_sdk
168175
169176
- name: compute SDK hash
170177
shell: bash

build_package.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ def main(argv):
163163
cmd_args.append("--enabled_sections=build_dotnet4")
164164
cmd_args.append("--output_unitypackage=False")
165165
else:
166-
cmd_args.append("--enabled_sections=build_dotnet3 build_dotnet4")
166+
cmd_args.append("--enabled_sections=build_dotnet3 build_dotnet4 asset_package_only")
167167

168168
# Check if need to gen new guids
169169
p = subprocess.Popen(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
170170
output, error = p.communicate()
171171
if p.returncode != 0:
172+
logging.info("Generate new Guids")
172173
error_str = str(error)
173174
error_str = error_str.split("assets:")[-1]
174175
error_str = error_str.rstrip("\\n\'")
@@ -187,12 +188,16 @@ def main(argv):
187188
print(file)
188189
gen_cmd_args.append(file)
189190
subprocess.call(gen_cmd_args)
190-
191-
# Need to package again if has that error
192-
subprocess.call(cmd_args)
193191
else:
194-
error_list = str(error).split("\\n")
195-
logging.info("\n".join(error_list))
192+
#error_list = str(error).split("\\n")
193+
logging.info("No need to generate new Guids")
194+
195+
# Package with new guids
196+
logging.info("Start Package")
197+
if os.path.exists(output_folder):
198+
shutil.rmtree(output_folder)
199+
subprocess.call(cmd_args)
200+
196201
logging.info("Packaging done for version %s", last_version)
197202

198203
if __name__ == '__main__':

unpack_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def unpack_one_package(script, product_path):
9595
output_file = os.path.join(output_path, dotnet_name+"_"+product_name+".txt")
9696
if os.path.exists(output_file):
9797
os.remove(output_file)
98-
subprocess.run(["tree",unpack_folder,"-o", output_file])
98+
subprocess.run(["tree","-h",unpack_folder,"-o", output_file])
9999
logging.info("%s is unpacked", product_path)
100100

101101
def main(argv):

0 commit comments

Comments
 (0)