new release file names with date and git hash

...without reference to 9000ish SVN
This commit is contained in:
Michael Peter Christen committed 2022-10-04 15:31:47 +02:00
1 parent ede9efe50c
commit 60c9986a0e
12 files changed
+292 -265

No files matched your search

+39 -30
View File
@@ -90,28 +90,27 @@
<property name="target-resolve-already-run" value="true" />
</target>
<!-- find git version and write it to git.revision -->
<available file=".git" type="dir" property="git.present"/>
<target name="git.revision" description="Store git revision in ${repository.version}" if="git.present">
<exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="describe"/>
<arg value="--tags"/>
<arg value="--always"/>
<arg value="--abbrev=7"/>
<arg value="HEAD"/>
</exec>
<condition property="repository.version" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="yes" length="0" when="greater"/>
</and>
</condition>
</target>
<!-- initializing all needed variables -->
<target name="init" depends="git.revision">
<!-- initializing all needed variables -->
<target name="init">
<loadproperties srcFile="build.properties" />
<property name="stdReleaseFile" value="yacy_v${releaseVersion}_${releaseNr}.tar.gz"/>
<exec executable="git" outputproperty="repository.revision.date">
<arg value="log"/>
<arg value="-1"/>
<arg value="--pretty=format:%ad" />
<arg value="--date=format:%Y%m%d" />
</exec>
<exec executable="git" outputproperty="repository.revision.time">
<arg value="log"/>
<arg value="-1"/>
<arg value="--pretty=format:%ad" />
<arg value="--date=format:%H%m" />
</exec>
<exec executable="git" outputproperty="repository.revision.hash">
<arg value="log"/>
<arg value="-1"/>
<arg value="--pretty=format:%h" />
</exec>
<mkdir dir="${data}"/>
<mkdir dir="${release}"/>
@@ -120,13 +119,23 @@
<echo message="YaCy Version number: ${releaseVersion}" />
<filter token="REPL_VERSION" value="${releaseVersion}" />
<!-- YaCy Release revision number -->
<echo message="YaCy Release number: ${releaseNr}" />
<filter token="REPL_REVISION_NR" value="${releaseNr}"/>
<!-- GIT Release revision number -->
<echo message="GIT Release Tag: ${repository.version}" />
<filter token="REPL_REPVER" value="${repository.version}"/>
<echo message="GIT Release Date: ${repository.revision.date}" />
<echo message="GIT Release Time: ${repository.revision.time}" />
<echo message="GIT Release Hash: ${repository.revision.hash}" />
<filter token="REPL_REPVERDATE" value="${repository.revision.date}"/>
<filter token="REPL_REPVERTIME" value="${repository.revision.time}"/>
<filter token="REPL_REPVERHASH" value="${repository.revision.hash}"/>
<!-- set time stamp: DSTAMP should have the format yyyyMMdd, TSTAMP hhmm -->
<tstamp/>
<filter token="REPL_DSTAMP" value="${DSTAMP}"/>
<filter token="REPL_TSTAMP" value="${TSTAMP}"/>
<!-- release file names -->
<property name="stdReleaseStub" value="yacy_v${releaseVersion}_${repository.revision.date}${repository.revision.time}_${repository.revision.hash}"/>
<property name="stdReleaseFile" value="${stdReleaseStub}.tar.gz"/>
<filter token="REPL_RELEASESTUB" value="${stdReleaseStub}"/>
<!-- apply replacments -->
<copy file="${defaults}/yacyBuild.properties.template" tofile="${defaults}/yacyBuild.properties" overwrite="true" filtering="true" />
@@ -518,8 +527,8 @@
<arg value="-NOCD" />
<arg value="${release_windows}/build.nsi" />
</exec>
<move file="${release_windows}/yacy_v${releaseVersion}_${releaseNr}.exe"
tofile="${release}/yacy_v${releaseVersion}_${releaseNr}.exe" />
<move file="${release_windows}/${stdReleaseStub}.exe"
tofile="${release}/${stdReleaseStub}.exe" />
<delete dir="${release_main}"/>
<delete dir="${release_windows}" failonerror="false" />
@@ -535,7 +544,7 @@
<chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACYMacOS.sh" perm="755"/>
<chmod file="${release_mac}/YaCy.app/Contents/MacOS/startYACY.sh" perm="755"/>
<exec executable="hdiutil">
<arg line="create -srcfolder ${release_mac}/YaCy.app ${release}/yacy_v${releaseVersion}_${releaseNr}.dmg"/>
<arg line="create -srcfolder ${release_mac}/YaCy.app ${release}/${stdReleaseStub}.dmg"/>
</exec>
<delete dir="${release_mac}" failonerror="false" verbose="false" />
</target>