Skip to content

Commit

Permalink
Add compression step (#153)
Browse files Browse the repository at this point in the history
* Add compression step

Signed-off-by: James Struga <[email protected]>

* remove windows executable

Signed-off-by: James Struga <[email protected]>

* Upgrade actions cache

Signed-off-by: James Struga <[email protected]>

---------

Signed-off-by: James Struga <[email protected]>
Co-authored-by: James Struga <[email protected]>
  • Loading branch information
struga0258 and James Struga authored Feb 6, 2025
1 parent 97f71fb commit 7326787
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
steps:

- name: '[Prep 1] Cache node modules'
uses: actions/cache@v2
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:

- name: '[Prep 1] Cache node modules'
uses: actions/cache@v2
uses: actions/cache@v4
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
Expand Down
23 changes: 23 additions & 0 deletions build_ng2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
<param name="packagejson.Location" value="${capstone}/zlux-app-manager/system-apps/web-browser-app/nodeServer"/>
<param name="buildType" value="build"/>
</antcall>
<antcall target="npmRunCompress">
<param name="packagejson.Location" value="${capstone}/zlux-app-manager/virtual-desktop"/>
</antcall>

<copy file="${capstone}/zlux-app-manager/virtual-desktop/node_modules/requirejs/require.js" tofile="${capstone}/zlux-app-manager/virtual-desktop/web/require.js" unless:set="isZos"/>

Expand Down Expand Up @@ -295,6 +298,26 @@
</if>
</target>

<target name="npmRunCompress" depends="package.jsonExists" if="package.jsonPresent">
<exec executable="npm"
dir="${packagejson.Location}"
osfamily="unix"
resultproperty="rc"
searchpath="true">
<arg line="run compress"/>
</exec>

<echo message="Result of compress in ${packagejson.Location} is: ${rc}"/>
<if>
<not>
<equals arg1="${rc}" arg2="0"/>
</not>
<then>
<fail message="Error with npm run compress in ${packagejson.Location}" />
</then>
</if>
</target>

<target name="package.jsonExists">
<available file="${packagejson.Location}/package.json" property="package.jsonPresent"/>
</target>
Expand Down

0 comments on commit 7326787

Please sign in to comment.