Skip to content
Snippets Groups Projects
Commit 8664b39f authored by BIGARET Sebastien's avatar BIGARET Sebastien
Browse files

New field package_date + release_date=date of last commit in core

parent fc536df5
No related branches found
No related tags found
No related merge requests found
Pipeline #94 failed
......@@ -3,14 +3,25 @@
# mise à jour de ReleaseInfo.java avec les nums. de release Praxis core+GUI
# et date courante
core=$(cd ~/Projets/praxis-git/praxis-core; git rev-parse --verify HEAD | cut -c -10)
swing=$(cd ~/Projets/praxis-git/praxis-swing-gui; git rev-parse --verify HEAD | cut -c -10)
echo core:$core GUI:$swing 1>&2
# git log --pretty=format:'%H %ai' HEAD -1
# git log --pretty=format:'%h, %ad' --date=short -1
#core=$(cd ~/Projets/praxis-git/praxis-core; git rev-parse --verify HEAD | cut -c -10)
#swing=$(cd ~/Projets/praxis-git/praxis-swing-gui; git rev-parse --verify HEAD | cut -c -10)
core=$(cd ~/Projets/praxis-git/praxis-core; git log --pretty=format:'%H %ad' --date=short HEAD -1)
swing=$(cd ~/Projets/praxis-git/praxis-swing-gui; git log --pretty=format:'%H %ad --date=short' HEAD -1)
core_htag=${core%% *}
swing_htag=${swing%% *}
echo core:${core_htag:0:10} GUI:${swing_htag:0:10} 1>&2
cd ~/Projets/praxis-git/praxis-core/src/eu/telecom_bretagne/praxis/common
sed -e 's|\(public *static *final *String *release *= *"\)[^"]*";|\1'"core:$core GUI:$swing\";|" ReleaseInfo.java > ReleaseInfo.java.sed
sed -i -e 's|\(public *static *final *String *release *= *"\)[^"]*";|\1'"core:${core_htag:0:10} GUI:${swing_htag:0:10}\";|" ReleaseInfo.java
sed -i -e 's|\(public *static *final *String *release_date *= *"\)[^"]*";|\1'"${core#* }\";|" ReleaseInfo.java
today=$(date +"%Y-%m-%d")
sed -e 's|\(public *static *final *String *release_date *= *"\)[^"]*";|\1'"$today\";|" ReleaseInfo.java.sed > ReleaseInfo.java
sed -i -e 's|\(public *static *final *String *package_date *= *"\)[^"]*";|\1'"$today\";|" ReleaseInfo.java
/bin/rm ReleaseInfo.java.sed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment