Skip to content

Commit

Permalink
Build related updates
Browse files Browse the repository at this point in the history
- Update npm packages
- Update build scripts
- Update github action workflow
  • Loading branch information
cathalnoonan committed Apr 27, 2022
1 parent 1c7412f commit cd6fc8e
Show file tree
Hide file tree
Showing 16 changed files with 6,330 additions and 11,203 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/BUILD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Build
on:
workflow_dispatch:
branches: [ main ]
# push:
# branches: [ main ]
push:
branches:
- main
- features/*
# pull_request:
# branches: [ main ]

Expand All @@ -15,29 +17,29 @@ jobs:
steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

# Configure environment
- name: Setup Node.js
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16.x
node-version-file: '.nvmrc'
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: 5.0.x
dotnet-version: 6.0.x

# Build the project
- name: Call build script
run: ./build.sh

# Prepare artifact(s)
- name: Get solution name
id: get-solution-name
run: echo "::set-output name=SOLUTION_NAME::$(basename $(find ./dist -type f -iname "*") .zip)"
# - Create an arbitrary file in the root of the dist directory.
# This is to avoid the artifacts zip auto extracting when double clicked.
- run: echo "${{ github.server_url }}/${{ github.repository }}" > ./dist/repo-url.txt
- name: 'Upload artifact'
uses: actions/upload-artifact@v2
with:
name: ${{ steps.get-solution-name.outputs.SOLUTION_NAME }}
path: ./dist/${{ steps.get-solution-name.outputs.SOLUTION_NAME }}.zip
retention-days: 30
name: ${{ github.event.repository.name }}__extract_this_zip
path: ./dist/*
retention-days: 15
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.4.2
2 changes: 2 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@echo off

@REM # Install dependencies for pcf project
cd ./control
call npm install --no-audit
call npm audit --prod
cd ..

@REM # Build the solution
call dotnet build ./solution -c Release
8 changes: 8 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/sh

# Use node version manager to install node version consistently
if (command -v nvm) ; then
nvm install && nvm use
fi

# Install dependencies for pcf project
npm --prefix ./control install --no-audit
npm --prefix ./control audit --prod

# Build the solution
dotnet build ./solution -c Release
2 changes: 1 addition & 1 deletion clean.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

call npx rimraf ./**/node_modules ./**/bin ./**/obj ./**/out ./**/dist
call npx rimraf ./**/node_modules ./**/bin ./**/obj ./**/out
2 changes: 1 addition & 1 deletion clean.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

npx rimraf ./**/node_modules ./**/bin ./**/obj ./**/out ./**/~ ./**/dist
npx rimraf ./**/node_modules ./**/bin ./**/obj ./**/out ./**/~
6 changes: 3 additions & 3 deletions control/ProcessSessions/ControlManifest.Input.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
<control namespace="Cathal" constructor="ProcessSessions" display-name-key="ProcessSessions_Display_Key" description-key="ProcessSessions_Desc_Key" control-type="standard"
version="1.1.1">
version="1.1.2">

<property name="field" display-name-key="Field_Display_Key" description-key="Field_Desc_Key" of-type-group="any" usage="bound" required="true" />

Expand Down Expand Up @@ -45,8 +45,8 @@

<resources>
<code path="index.ts" order="1"/>
<resx path="strings/ProcessSessions.1030.resx" version="1.1.1" />
<resx path="strings/ProcessSessions.1033.resx" version="1.1.1" />
<resx path="strings/ProcessSessions.1030.resx" version="1.1.2" />
<resx path="strings/ProcessSessions.1033.resx" version="1.1.2" />
</resources>

<feature-usage>
Expand Down
2 changes: 1 addition & 1 deletion control/featureconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"pcfAllowCustomWebpack": "on"
"pcfAllowCustomWebpack": "on"
}
Loading

0 comments on commit cd6fc8e

Please sign in to comment.