-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp - Rolled out updated build scripts
--- The build scripts have been updated. --- Type: imp Breaking: False Doc Required: False Backport Required: False Part: 1/1
- Loading branch information
Showing
4 changed files
with
112 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,52 @@ | ||
#!/bin/bash | ||
|
||
# VisualCard Copyright (C) 2021-2024 Aptivi | ||
# | ||
# This file is part of VisualCard | ||
# | ||
# VisualCard is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# VisualCard is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY, without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
# Convenience functions | ||
checkerror() { | ||
if [ $1 != 0 ] | ||
then | ||
printf "$2 - Error $1\n" >&2 | ||
exit $1 | ||
fi | ||
} | ||
|
||
# This script builds KS and packs the artifacts. Use when you have MSBuild installed. | ||
ksversion=$(grep "<Version>" ../Directory.Build.props | cut -d "<" -f 2 | cut -d ">" -f 2) | ||
checkerror $? "Failed to get version. Check to make sure that the version is specified correctly in D.B.props" | ||
|
||
# Check for dependencies | ||
zippath=`which zip` | ||
if [ ! $? == 0 ]; then | ||
echo zip is not found. | ||
exit 1 | ||
fi | ||
checkerror $? "zip is not found" | ||
|
||
# Pack documentation | ||
echo Packing documentation... | ||
cd "../docs/" && "$zippath" -r /tmp/$ksversion-doc.zip . && cd - | ||
if [ ! $? == 0 ]; then | ||
echo Packing failed. | ||
exit 1 | ||
fi | ||
checkerror $? "Failed to pack" | ||
|
||
# Inform success | ||
rm -rf "../DocGen/api" | ||
checkerror $? "Failed to remove api folder" | ||
rm -rf "../DocGen/obj" | ||
checkerror $? "Failed to remove obj folder" | ||
rm -rf "../docs" | ||
checkerror $? "Failed to remove docs folder" | ||
mv /tmp/$ksversion-doc.zip . | ||
checkerror $? "Failed to move archive from temporary folder" | ||
echo Pack successful. | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters