diff --git a/.github/workflows/translationtool-build.yml b/.github/workflows/translationtool-build.yml new file mode 100644 index 00000000..353b62d0 --- /dev/null +++ b/.github/workflows/translationtool-build.yml @@ -0,0 +1,36 @@ +name: Build + + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + name: translationtool.phar + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up php 8.0 + uses: shivammathur/setup-php@v2 + with: + php-version: "8.0" + coverage: none + + - name: Build translationtool.phar + working-directory: translations/translationtool/ + run: make translationtool.phar + + - name: Upload translationtool + uses: actions/upload-artifact@v2 + with: + name: translationtool.phar + path: translations/translationtool/translationtool.phar + + - name: Check build changes + run: | + git status --porcelain translations/translationtool/ + bash -c "[[ ! \"`git status --porcelain translations/translationtool/translationtool.phar`\" ]] || exit 1" diff --git a/translations/translationtool/Makefile b/translations/translationtool/Makefile index d48b225b..c8ae8446 100644 --- a/translations/translationtool/Makefile +++ b/translations/translationtool/Makefile @@ -1,16 +1,26 @@ .PHONY: translationtool.phar -translationtool.phar: install-composer-deps +translationtool.phar: clean install-composer-deps php -d phar.readonly=off vendor/bin/phar-composer build src chmod +x translationtool.phar install-composer-deps: composer.phar php composer.phar install php composer.phar install -d src + rm src/vendor/gettext/gettext/CHANGELOG.md + rm src/vendor/gettext/gettext/composer.json + rm src/vendor/gettext/gettext/CONTRIBUTING.md + rm src/vendor/gettext/gettext/LICENSE + rm src/vendor/gettext/gettext/phpcs.xml + rm src/vendor/gettext/gettext/README.md + rm src/vendor/gettext/languages/composer.json + rm src/vendor/gettext/languages/LICENSE + rm src/vendor/gettext/languages/UNICODE-LICENSE.txt composer.phar: curl -sS https://getcomposer.org/installer | php clean: - rm -f translationtool.phar composer.lock src/composer.lock - rm -rf vendor src/vendor \ No newline at end of file + rm -f translationtool.phar + rm -f composer.phar + rm -rf vendor src/vendor diff --git a/translations/translationtool/translationtool.phar b/translations/translationtool/translationtool.phar index eb056550..607d36d9 100755 Binary files a/translations/translationtool/translationtool.phar and b/translations/translationtool/translationtool.phar differ