[ticket/17173] Add functionality for signing build packages to build script

PHPBB3-17173
This commit is contained in:
Marc Alexander 2023-08-11 19:36:30 +02:00
parent 1ea2cbb678
commit 74f3453db1
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View file

@ -49,6 +49,7 @@
/vagrant/phpbb-install-config.yml /vagrant/phpbb-install-config.yml
.vagrant .vagrant
node_modules node_modules
/build/package_signature
# Excludes IDE / editors files # Excludes IDE / editors files
*~ *~

View file

@ -203,6 +203,10 @@
<phingcall target="checksum-dir"> <phingcall target="checksum-dir">
<property name="dir" value="build/new_version/release_files" /> <property name="dir" value="build/new_version/release_files" />
</phingcall> </phingcall>
<phingcall target="sign-packages">
<property name="dir" value="build/new_version/release_files" />
</phingcall>
</target> </target>
<target name="checksum-dir"> <target name="checksum-dir">
@ -219,6 +223,31 @@
<exec dir="${dir}" command="sha256sum ${filename} > ${filename}.sha256" /> <exec dir="${dir}" command="sha256sum ${filename} > ${filename}.sha256" />
</target> </target>
<target name="sign-packages">
<property name="packageSignatureExists" value="false" />
<exec command="if [ -f 'build/package_signature' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="packageSignatureExists" />
<if>
<equals arg1="${packageSignatureExists}" arg2="true" />
<then>
<foreach param="filename" absparam="absfilename" target="sign-file">
<fileset dir="${dir}">
<type type="file" />
<include name="*.tar.bz2"/>
<include name="*.zip"/>
</fileset>
</foreach>
</then>
<else>
<echo msg="Skipping signing of packages due to missing build/package_signature"/>
</else>
</if>
</target>
<target name="sign-file">
<echo msg="Creating signature file for ${absfilename}" />
<exec command="php build/generate_signature.php `cat build/package_signature` ${absfilename}" />
</target>
<target name="announcement" depends="prepare"> <target name="announcement" depends="prepare">
<echo msg="Writing download links and checksums for email announcement to save/announcement_email_${newversion}.txt" /> <echo msg="Writing download links and checksums for email announcement to save/announcement_email_${newversion}.txt" />
<exec dir="build" escape="false" <exec dir="build" escape="false"