Skip to content

Commit

Permalink
Merge pull request #1569 from janosimas/b4.0.5
Browse files Browse the repository at this point in the history
revision file in docker package generator
  • Loading branch information
janosimas authored May 25, 2018
2 parents 2ce52a3 + cf2aefe commit db6f000
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions docker/package/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,30 @@ rm -f /devel/build-package/*.deb
rm -f /devel/terrama2/packages/debian-package/terrama2-doc*
rm -f /devel/terrama2/packages/debian-package/terrama2-doc*.deb

(
cd /devel/terrama2
git pull

cd packages/debian-package
./deb-terrama2.sh
valid $? "Unable to create the TerraMA2 package."
./deb-helper.sh
valid $? "Unable to create the TerraMA2 doc package."
)

cd packages
cd /devel/terrama2
git pull
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
GIT_REMOTE_NAME=`git config branch.${GIT_BRANCH}.remote`
GIT_REMOTE=`git remote get-url ${GIT_REMOTE_NAME}`
GIT_COMMIT=`git rev-parse HEAD`
GIT_DATE=`git log -1 --format=%cd`

cd packages/debian-package
./deb-terrama2.sh
valid $? "Unable to create the TerraMA2 package."
./deb-helper.sh
valid $? "Unable to create the TerraMA2 doc package."


cd /packages
(
mkdir -p /packages/${VERSION}/${packages_folder}
cp /devel/build-package/*.deb /packages/${VERSION}/${packages_folder}
cp /devel/terrama2/packages/debian-package/*.deb /packages/${VERSION}/${packages_folder}

echo ${GIT_REMOTE} >> /packages/${VERSION}/${packages_folder}/version.txt
echo ${GIT_BRANCH} >> /packages/${VERSION}/${packages_folder}/version.txt
echo ${GIT_COMMIT} >> /packages/${VERSION}/${packages_folder}/version.txt
echo ${GIT_DATE} >> /packages/${VERSION}/${packages_folder}/version.txt
)

0 comments on commit db6f000

Please sign in to comment.