Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (50 sloc) 1.41 KB
@echo off
cls
SET _build=%1
IF NOT [%_build%]==[] (
SET _revision=--no-revision
IF "%_build%" == "patch" goto build
IF "%_build%" == "minor" goto build
IF "%_build%" == "major" goto build
goto unrecognized
) ELSE (
SET _build=DEV:DEBUG
SET _revision=
goto build
)
:build
echo.
echo BUILDING '%_build%' PACKAGE 
echo.
IF NOT [%1]==[] goto warning
goto execute
:warning
echo WARNING: Your code must be checked in prior to buildings a MAJOR/MINOR/PATCH.
echo Verify that you have a clean working tree before continuing.
echo.
set /p answer=I HAVE VERIFIED MY WORKING TREE IS CLEAN (Y/N)? 
if /i "%answer:~,100%" EQU "Y" goto execute
if /i "%answer:~,100%" EQU "N" goto finish
echo Please type Y for Yes or N for No
goto warning
:execute
call gulp clean
call gulp build --ship %_revision%
call gulp bundle --ship --no-revision
IF NOT [%1]==[] (
call npm version %_build%
)
call gulp package-solution --ship
call npx webpack --config webpack.config.js
goto openfolder
:openfolder
call explorer .\sharepoint\solution\
goto finish
:unrecognized
echo.
echo Unrecognized parameters specified.
echo.
echo Specify no parameter for development build.
echo Use 'patch', 'minor', or 'major' for production level builds.
echo.
:finish
You can’t perform that action at this time.