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 886a99e commit f7b9fc1
Show file tree
Hide file tree
Showing 16 changed files with 5,701 additions and 10,779 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
4 changes: 3 additions & 1 deletion 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 ..

call dotnet build ./solution -c Release
@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 ./**/~
4 changes: 2 additions & 2 deletions control/SecurityRoleManager/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="SecurityRoleManager" display-name-key="SecurityRoleManager" description-key="SecurityRoleManager_description" control-type="standard" preview-image="preview.png"
version="2.0.0">
version="2.0.1">

<property name="sampleProperty" display-name-key="Property_Display_Key" description-key="Property_Desc_Key" of-type-group="any" usage="bound" required="true" />

Expand Down Expand Up @@ -44,7 +44,7 @@

<resources>
<code path="index.ts" order="1"/>
<resx path="strings/SecurityRoleManager.1033.resx" version="2.0.0" />
<resx path="strings/SecurityRoleManager.1033.resx" version="2.0.1" />
</resources>

<!-- UNCOMMENT TO ENABLE THE SPECIFIED API -->
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 f7b9fc1

Please sign in to comment.