Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfredoRamos committed Dec 12, 2024
1 parent 885e332 commit 9e0a69e
Show file tree
Hide file tree
Showing 6 changed files with 2,610 additions and 828 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build/
vendor/
node_modules/
composer.lock
*.tmp
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 22.2.0
nodejs 23.1.0
35 changes: 22 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="Imgur Extension Builder" description="Builds an extension.zip from a git repository" default="all">
<project name="Imgur Extension Builder" description="Builds an extension.zip from a git repository"
default="all">
<property name="env" value="production" />
<property name="vendor-name" value="alfredoramos" />
<property name="extension-name" value="imgur" />
Expand All @@ -20,8 +21,8 @@
<delete dir="${dir}/scss" />
<delete dir="${dir}/tests" />
<delete dir="${dir}/node_modules" />
<delete dir="${dir}/.github"/>
<delete dir="${dir}/.vscode"/>
<delete dir="${dir}/.github" />
<delete dir="${dir}/.vscode" />
<delete file="${dir}/.gitignore" />
<delete file="${dir}/.gitattributes" />
<delete file="${dir}/.editorconfig" />
Expand Down Expand Up @@ -50,10 +51,11 @@
<!-- DO NOT EDIT BELOW THIS LINE -->
<property name="version" value="HEAD" override="true" />
<property name="build-directory" value="build" override="true" />
<property name="package-directory" value="${build-directory}/package/${vendor-name}/${extension-name}" />
<property name="package-directory"
value="${build-directory}/package/${vendor-name}/${extension-name}" />

<!-- Remove incomplete translations. -->
<property name="exclude-langs" value="fr" override="true" />
<property name="exclude-langs" value="" override="true" />

<!-- These are the main targets which you will probably want to use -->
<target name="all" depends="prepare-structure,package" />
Expand All @@ -78,7 +80,8 @@
<!-- Replace invalid characters in language files -->
<target name="clean-lang">
<echo msg="Replacing invalid characters: ${filename}" />
<exec dir="${package-directory}/language" command="sed -ri 's|'\\\\\''|’|g' ${filename}" checkreturn="true" />
<exec dir="${package-directory}/language" command="sed -ri 's|'\\\\\''|’|g' ${filename}"
checkreturn="true" />
</target>

<!-- Clean up the language directory -->
Expand Down Expand Up @@ -134,7 +137,8 @@
<equals arg1="${has-dependencies}" arg2="1" />
<then>
<echo msg="Installing dependencies" />
<exec dir="${package-directory}" command="composer update -n --prefer-dist --no-dev" checkreturn="true" />
<exec dir="${package-directory}" command="composer update -n --prefer-dist --no-dev"
checkreturn="true" />
</then>
</if>

Expand All @@ -157,25 +161,30 @@
</if>

<phingcall target="wrap-package">
<property name="destination-filename" value="${build-directory}/upload/${vendor-name}_${extension-name}_${package-version}" />
<property name="destination-filename"
value="${build-directory}/upload/${vendor-name}_${extension-name}_${package-version}" />
</phingcall>
</target>

<!-- Checkout a given version and install/clean the dependencies -->
<target name="git-checkout">
<echo msg="Getting archive for ${archive-version}" />

<exec command="git archive ${archive-version} --format zip --output ${build-directory}/checkout/${archive-version}.zip"
<exec
command="git archive ${archive-version} --format zip --output ${build-directory}/checkout/${archive-version}.zip"
checkreturn="true" />
<unzip file="${build-directory}/checkout/${archive-version}.zip" todir="${package-directory}" />
<unzip file="${build-directory}/checkout/${archive-version}.zip"
todir="${package-directory}" />
</target>

<!-- Create the zip and tar ball -->
<target name="wrap-package">
<echo msg="Creating archives (${vendor-name}/${extension-name} ${version})" />
<zip basedir="${build-directory}/package/" destfile="${destination-filename}.zip" />
<tar basedir="${build-directory}/package/" destfile="${destination-filename}.tar.gz" compression="gzip" />
<tar basedir="${build-directory}/package/" destfile="${destination-filename}.tar.bz2" compression="bzip2" />
<tar basedir="${build-directory}/package/" destfile="${destination-filename}.tar.gz"
compression="gzip" />
<tar basedir="${build-directory}/package/" destfile="${destination-filename}.tar.bz2"
compression="bzip2" />

<echo msg="Generating checksums" />
<manifest checksum="sha512" file="${build-directory}/upload/checksums.sha512">
Expand All @@ -186,4 +195,4 @@
</fileset>
</manifest>
</target>
</project>
</project>
Loading

0 comments on commit 9e0a69e

Please sign in to comment.