lib/build/nugetPrepare.step in uppercutbuild-1.3.0.0 vs lib/build/nugetPrepare.step in uppercutbuild-1.4.0.0

- old
+ new

@@ -37,135 +37,108 @@ <property name="version.revision" value="0" overwrite="false" /> <property name="assembly.version.full" value="${version.major}.${version.minor}.${version.build}.${version.revision}" /> <property name="assembly.version.full" value="${version.major}.${version.minor}.${version.patch}.0" if="${version.use_semanticversioning}" /> <property name="file.nuget.version" value="${dirs.drop.nuget}${path.separator}version.xml" /> - <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" /> - <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" /> - <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" /> <property name="is.replaced" value="false" /> <property name="fail.build.on.error" value="false" /> <target name="go" depends="run_tasks" if="${folder.nuget.exists}" /> <target name="run_tasks" if="${folder.nuget.exists}"> - <echo message="Running ${project::get-name()} tasks." /> - <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" /> - <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" /> + <echo level="Warning" message="" /> + <echo level="Warning" message="====================" /> + <echo level="Warning" message="${project::get-name()}" /> + <echo level="Warning" message="====================" /> + <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" /> + <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" /> <call target="run_normal_tasks" if="${not is.replaced}" /> - <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" /> + <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" /> </target> <target name="run_normal_tasks" - depends="prepare, copy_nuget_folder, copy_app_drop_to_lib_folder, copy_docs_to_doc_folder, copy_notices_to_doc_folder, update_nuspecs_with_version" + depends="prepare, copy_nuget_folder, copy_app_drop_to_lib_folder, copy_docs_to_doc_folder, copy_notices_to_doc_folder, set_file_attributes_to_normal, update_nuspecs_with_version" description="Packaging nuget." /> <target name="prepare"> - <echo message="Removing and adding ${dirs.drop.nuget}."/> + <echo level="Warning" message="Removing and adding ${dirs.drop.nuget}."/> <delete dir="${dirs.drop.nuget}" failonerror="false" /> <mkdir dir="${dirs.drop.nuget}" /> </target> - <target name="custom_tasks_before"> - <echo message="Running custom tasks if ${file.custom.step.before} exists." /> - <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" /> - <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}"> - <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" /> - </exec> - <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}"> - <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" /> - </exec> - </target> - - <target name="custom_tasks_replace"> - <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." /> - <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" /> - <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" /> - <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" /> - <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" > - <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" /> - </exec> - <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" /> - <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" > - <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" /> - </exec> - </target> - <target name="copy_nuget_folder"> - <echo message="Packaging nuspec specifications and special files from ${dirs.nuget} to ${dirs.drop.nuget}."/> + <echo level="Warning" message="Packaging nuspec specifications and special files from ${dirs.nuget} to ${dirs.drop.nuget}."/> <copy todir="${dirs.drop.nuget}"> <fileset basedir="${dirs.nuget}"> <include name="**/**" /> </fileset> </copy> </target> <target name="copy_app_drop_to_lib_folder"> - <echo message="Packaging ${project.name} nuget pieces into ${dirs.drop.nuget}${path.separator}lib from ${dirs.drop}${path.separator}${folder.app.drop}."/> + <echo level="Warning" message="Packaging ${project.name} nuget pieces into ${dirs.drop.nuget}${path.separator}lib from ${dirs.drop}${path.separator}${folder.app.drop}."/> <copy todir="${dirs.drop.nuget}${path.separator}lib"> <fileset basedir="${dirs.drop}${path.separator}${folder.app.drop}"> <include name="**/**" /> </fileset> </copy> </target> <target name="copy_docs_to_doc_folder"> - <echo message="Packaging docs to ${dirs.drop.nuget}${path.separator}docs."/> + <echo level="Warning" message="Packaging docs to ${dirs.drop.nuget}${path.separator}docs."/> <copy todir="${dirs.drop.nuget}${path.separator}docs" failonerror="false"> <fileset basedir="${dirs.drop}${path.separator}${folder.documentation}"> <include name="**/**" /> </fileset> </copy> </target> <target name="copy_notices_to_doc_folder"> - <echo message="Packaging readme file to ${dirs.drop.nuget}${path.separator}docs."/> + <echo level="Warning" message="Packaging readme file to ${dirs.drop.nuget}${path.separator}docs."/> <copy file="${dirs.current}${path.separator}..${path.separator}README.markdown" tofile="${dirs.drop.nuget}${path.separator}docs${path.separator}README" failonerror="false" /> - <echo message="Packaging other legal stuff to ${dirs.drop.nuget}${path.separator}docs."/> + <echo level="Warning" message="Packaging other legal stuff to ${dirs.drop.nuget}${path.separator}docs."/> <copy todir="${dirs.drop.nuget}${path.separator}docs" failonerror="false"> <fileset basedir="${dirs.drop}${path.separator}LEGAL"> <include name="**/*" /> </fileset> </copy> </target> <target name="generate_version_file"> - <echo message="Generating ${file.nuget.version} with ${assembly.version.full} for the version" /> - <echo file="${file.nuget.version}" append="false" failonerror="false"> + <echo level="Warning" message="Generating ${file.nuget.version} with ${assembly.version.full} for the version" /> + <echo level="Warning" file="${file.nuget.version}" append="false" failonerror="false"> <![CDATA[<?xml version="1.0" ?> <nuget> <version>${assembly.version.full}</version> </nuget>]]> </echo> </target> + <target name="set_file_attributes_to_normal"> + <echo level="Warning" message="Removing read only attributes that some source control things put on files in '${dirs.drop.nuget}'." /> + <attrib normal="true"> + <fileset basedir="${dirs.drop.nuget}"> + <include name="**/*" /> + </fileset> + </attrib> + </target> + <target name="update_nuspecs_with_version"> - <echo message="Finding and updating version in all nuspec files in ${dirs.drop.nuget}."/> + <echo level="Warning" message="Finding and updating version in all nuspec files in ${dirs.drop.nuget}."/> <foreach item="File" property="spec.file"> <in> <items> - <include name="${dirs.drop.nuget}${path.separator}*.nuspec" /> + <include name="${dirs.drop.nuget}${path.separator}**${path.separator}*.nuspec" /> </items> </in> <do> - <echo message="Replacing version in '${spec.file}'" /> + <echo level="Warning" message="Replacing version in '${spec.file}'" /> <xmlpoke file="${spec.file}" xpath="/package/metadata/version" value="${assembly.version.full}" /> </do> </foreach> </target> - <target name="custom_tasks_after"> - <echo message="Running custom tasks if ${file.custom.step.after} exists." /> - <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" /> - <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" > - <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" /> - </exec> - <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" > - <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" /> - </exec> - </target> - </project> \ No newline at end of file