Skip to content

Commit 8b69ced

Browse files
author
Chris Maunder
committed
Module packages now stored in their own folder
1 parent ac1ec4a commit 8b69ced

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

devops/build/create_packages.bat

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ set dotNetTarget=net8.0
3737

3838
:: Basic locations
3939

40-
:: The name of the dir, within the current directory, where install assets will
41-
:: be downloaded
42-
set downloadDir=downloads
40+
:: The name of the dir, within the root directory, where packages will be stored
41+
set packageDir=\downloads\modules\packages
4342

4443
:: The name of the dir holding the source code
4544
set srcDir=src
@@ -102,7 +101,11 @@ set utilsScript=!utilsScriptsDirPath!\utils.bat
102101
:: The location of directories relative to the root of the solution directory
103102
set modulesDirPath=!rootDirPath!\!modulesDir!
104103
set externalModulesDirPath=!rootDirPath!\..\!externalModulesDir!
105-
set downloadDirPath=!rootDirPath!\!downloadDir!
104+
set packageDirPath=!rootDirPath!\!packageDir!
105+
106+
if [ ! -d "${packageDirPath}" ]; then mkdir -p "${packageDirPath}"; fi
107+
if not exist "!packageDirPath!" mkdir "!packageDirPath!"
108+
106109

107110
:: Let's go
108111
if /i "!useColor!" == "true" call "!utilsScript!" setESC
@@ -241,8 +244,8 @@ REM Creates a package for a module
241244

242245
rem Move package into modules download cache
243246

244-
rem echo Moving !packageModuleDirPath!\!packageModuleId!-!version!.zip to !downloadDirPath!\!modulesDir!\
245-
move /Y !packageModuleDirPath!\!packageModuleId!-!packageVersion!.zip !downloadDirPath!\!modulesDir!\ >NUL
247+
rem echo Moving !packageModuleDirPath!\!packageModuleId!-!version!.zip to !packageDirPath!\
248+
move /Y !packageModuleDirPath!\!packageModuleId!-!packageVersion!.zip !packageDirPath!\ >NUL
246249

247250
if errorlevel 1 (
248251
call "!utilsScript!" WriteLine "Error" "Red"

devops/build/create_packages.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ dotNetTarget="net8.0"
3535

3636
# Basic locations
3737

38-
# The name of the dir, within the current directory, where install assets will
39-
# be downloaded
40-
downloadDir='downloads'
38+
# The name of the dir, within the root directory, where packages will be stored
39+
packageDir='downloads/modules/packages'
4140

4241
# The name of the source directory (in development)
4342
srcDirName='src'
@@ -167,8 +166,8 @@ function doModulePackage () {
167166
popd >/dev/null
168167

169168
# Move package into modules download cache
170-
# echo Moving ${packageModuleDirPath}/${packageModuleId}-${packageVersion}.zip to ${downloadDirPath}/${modulesDir}/
171-
mv -f ${packageModuleDirPath}/${packageModuleId}-${packageVersion}.zip ${downloadDirPath}/${modulesDir}/ >/dev/null
169+
# echo Moving ${packageModuleDirPath}/${packageModuleId}-${packageVersion}.zip to ${packageDirPath}/
170+
mv -f ${packageModuleDirPath}/${packageModuleId}-${packageVersion}.zip ${packageDirPath}/ >/dev/null
172171

173172
if [ $? -ne 0 ]; then
174173
writeLine "Error" "Red"
@@ -185,7 +184,9 @@ function doModulePackage () {
185184
# The location of directories relative to the root of the solution directory
186185
modulesDirPath="${rootDirPath}//${modulesDir}"
187186
externalModulesDirPath="${rootDirPath}/../${externalModulesDir}"
188-
downloadDirPath="${rootDirPath}/${downloadDir}"
187+
packageDirPath="${rootDirPath}/${packageDir}"
188+
189+
if [ ! -d "${packageDirPath}" ]; then mkdir -p "${packageDirPath}"; fi
189190

190191
# Let's go
191192

0 commit comments

Comments
 (0)