This repository has been archived by the owner on Jan 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'tools/' changes from dde4119..d8ccc39
d8ccc39 cmake download path fixed 25561a5 package creation script a bit more friendly 921ebbe libmakefile update to 98c93280becf4836c3ebbd1ad6009f78b3298fb1 e967c17 open source package version updates: CMAKE_VERSION="3.9.3" COREUTILS_VERSION="8.28" FASM_VERSION="1.71.64" MPFR_VERSION="3.1.6" fa1759d libmakefile sync'd to 18076e48d76d7c64b43afae13a1e6fea08f5c92c git-subtree-dir: tools git-subtree-split: d8ccc39370f0267c55d9331732d39d23ba97d7ae
- Loading branch information
Showing
6 changed files
with
52 additions
and
44 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
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
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,48 +1,55 @@ | ||
#!/bin/sh | ||
|
||
# get version info | ||
git_revision_output=$(git rev-parse --verify HEAD) | ||
git_tag_output=$(git describe --all --exact-match $git_revision_output) | ||
git_rev_output=$(git rev-parse --verify HEAD) | ||
git_tag_output=$(git describe --all --exact-match $git_rev_output) | ||
git_status_output=$(git diff) | ||
|
||
# check associated tag | ||
# check if associated tag exist for that commit | ||
if [[ $git_tag_output == *"tags"* ]]; then | ||
git_tag_string=${git_tag_output##*/} | ||
else | ||
git_tag_string="unknown" | ||
fi | ||
|
||
# check for modifications | ||
# check for any code modifications | ||
if [ -n "$git_status_output" ]; then | ||
git_version_string=$git_revision_output-dirty | ||
git_rev_string=$git_rev_output-dirty | ||
git_tag_string="unknown" | ||
else | ||
git_version_string=$git_revision_output | ||
git_rev_string=$git_rev_output | ||
fi | ||
|
||
echo "tools commit version : $git_version_string" | ||
echo "tools tag version : $git_tag_string" | ||
echo "creating 'tools-$git_version_string' release" | ||
# pick version string (tag name, if exists or commit version) | ||
if [[ $git_tag_string == "unknown" ]]; then | ||
release_version=$git_rev_string | ||
else | ||
release_version=$git_tag_string | ||
fi | ||
|
||
echo "tools rev version : $git_rev_string" | ||
echo "tools tag version : $git_tag_string" | ||
echo "creating 'tools-$release_version' release" | ||
|
||
# prepare environment | ||
source environment; | ||
export BSPJOB=16; | ||
export BSPSUDO=sudo; | ||
export BSPTOOLS=/usr/local/tools-$git_version_string; | ||
export BSPTOOLS=/usr/local/tools-$release_version; | ||
export PATH=${BSPTOOLS}/bin:${PATH}; | ||
|
||
# add version info | ||
sudo mkdir -p ${BSPTOOLS} | ||
echo $git_version_string > version.txt | ||
echo $git_tag_string >> version.txt | ||
echo $git_rev_string > version.txt | ||
echo $git_tag_string >> version.txt | ||
sudo mv version.txt ${BSPTOOLS}/version.txt | ||
|
||
# build tools | ||
make | ||
echo "'tools-$git_version_string' is installed with root priviliges under ${BSPTOOLS}" | ||
echo "'tools-$release_version' is installed with root priviliges under ${BSPTOOLS}" | ||
|
||
# create tarball and checksum | ||
echo "creating tools tarball 'tools-$git_version_string.tar.bz2' and checksum" | ||
tar -cjvf tools-$git_version_string.tar.bz2 ${BSPTOOLS} | ||
shasum -a 256 tools-$git_version_string.tar.bz2 > tools-$git_version_string.tar.bz2.hash | ||
shasum -a 256 -c tools-$git_version_string.tar.bz2.hash | ||
echo "creating tools tarball 'tools-$release_version.tar.bz2' and checksum" | ||
tar -cjvf tools-$release_version.tar.bz2 ${BSPTOOLS} | ||
shasum -a 256 tools-$release_version.tar.bz2 > tools-$release_version.tar.bz2.hash | ||
shasum -a 256 -c tools-$release_version.tar.bz2.hash |