Add scripts to make binary zips for distribution
This commit is contained in:
40
mkdist.bat
Normal file
40
mkdist.bat
Normal file
@@ -0,0 +1,40 @@
|
||||
@echo off
|
||||
SET VERSION_FILE=bin\.version
|
||||
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git rev-parse --short=8 HEAD"`) DO (
|
||||
SET GIT_REV=%%F
|
||||
)
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git rev-parse --symbolic-full-name --abbrev-ref HEAD"`) DO (
|
||||
SET GIT_BRANCH=%%F
|
||||
)
|
||||
FOR /F "usebackq tokens=*" %%F IN (`"git log -1 --format=%%cs"`) DO (
|
||||
SET LAST_COMMIT_DATE=%%F
|
||||
)
|
||||
|
||||
REM Extended version info:
|
||||
echo %GIT_BRANCH%@%GIT_REV% (%LAST_COMMIT_DATE%) > %VERSION_FILE%
|
||||
REM or just ommit extended version info:
|
||||
rem if exist %VERSION_FILE% del %VERSION_FILE%
|
||||
|
||||
SET TARGET_ZIP=opensim-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
echo %TARGET_ZIP%
|
||||
set excludes=-x "*.pdb" "*Tests*" "bin/Gloebit.dll" "bin/OpenSimMutelist.Modules.dll"
|
||||
zip -r -o "%TARGET_ZIP%" bin CONTRIBUTORS.txt LICENSE.txt README.md ThirdPartyLicenses %excludes%
|
||||
|
||||
if not exist bin\OpenSimMutelist.Modules.dll goto skipmutelist
|
||||
SET TARGET_ZIP=opensimmutelist-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
set excludes=-x "*.pdb" "*Tests*"
|
||||
echo %TARGET_ZIP%
|
||||
zip -r -o "%TARGET_ZIP%" bin/OpenSimMutelist.Modules.dll %excludes%
|
||||
:skipmutelist
|
||||
|
||||
if not exist bin\Gloebit.dll goto skipgloebit
|
||||
SET TARGET_ZIP=gloebit-%GIT_BRANCH%-%LAST_COMMIT_DATE%_%GIT_REV%.zip
|
||||
set excludes=-x "*.pdb" "*Tests*"
|
||||
echo %TARGET_ZIP%
|
||||
copy addon-modules\Gloebit\GloebitMoneyModule\Gloebit.ini.example bin\Gloebit.ini.example
|
||||
zip -r -o "%TARGET_ZIP%" bin/Gloebit.dll bin/Gloebit.ini.example %excludes%
|
||||
:skipgloebit
|
||||
|
||||
|
||||
:end
|
||||
31
mkdist.sh
Normal file
31
mkdist.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
GIT_REV=`git rev-parse --short=8 HEAD`
|
||||
GIT_BRANCH=`git rev-parse --symbolic-full-name --abbrev-ref HEAD`
|
||||
CUR_DATE=`date --rfc-3339='date'`
|
||||
LAST_COMMIT_DATE=`git log -1 --format=%cs`
|
||||
|
||||
# Extended version info:
|
||||
echo "${GIT_BRANCH}@${GIT_REV} (${LAST_COMMIT_DATE})" > bin/.version
|
||||
# or just ommit extended version info:
|
||||
#rm -f bin/.version
|
||||
|
||||
EXCLUDES="*.mdb *.pdb *.dll.so *Tests* *Gloebit* *OpenSimMutelist*"
|
||||
TARGETZIP=opensim-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
echo "${TARGETZIP}"
|
||||
zip -r -o ${TARGETZIP} bin CONTRIBUTORS.txt LICENSE.txt README.md ThirdPartyLicenses -x ${EXCLUDES}
|
||||
|
||||
#Make seperate zip for OpenSimMutelist addon:
|
||||
if [ -f bin/OpenSimMutelist.Modules.dll ]; then
|
||||
TARGETZIP=opensimmutelist-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
echo "${TARGETZIP}"
|
||||
zip -r -o ${TARGETZIP} bin/OpenSimMutelist.dll
|
||||
fi
|
||||
|
||||
#Make seperate zip for Gloebit addon:
|
||||
if [ -f bin/Gloebit.dll ]; then
|
||||
TARGETZIP=gloebit-${GIT_BRANCH}-${LAST_COMMIT_DATE}_${GIT_REV}.zip
|
||||
echo "${TARGETZIP}"
|
||||
cp addon-modules/Gloebit/GloebitMoneyModule/Gloebit.ini.example bin/Gloebit.ini.example
|
||||
zip -r -o ${TARGETZIP} bin/Gloebit.dll bin/Gloebit.ini.example
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user