Skip to content

Commit 2ea4d5a

Browse files
committed
updated build
1 parent 18ebd6e commit 2ea4d5a

File tree

7 files changed

+24
-18
lines changed

7 files changed

+24
-18
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.1
1+
FROM php:8.4
22

33
MAINTAINER "niconoe-" <[email protected]>
44

Makefile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,31 @@ compatibility:
1313
# Used for tag releasing
1414
# Don't use directly, use `make release` instead
1515
tag:
16-
@semver inc $(VERSION)
17-
@echo "New release: `semver tag`"
18-
@echo Releasing sources
19-
@sed -i -r "s/(v[0-9]+\.[0-9]+\.[0-9]+)/`semver tag`/g" \
16+
echo "New release: $(TAG)"
17+
echo Releasing sources
18+
sed -i -r "s/(v[0-9]+\.[0-9]+\.[0-9]+)/$(TAG)/g" \
2019
.github/ISSUE_TEMPLATE/Bug_report.md \
2120
.github/ISSUE_TEMPLATE/Feature_request.md \
2221
src/functions.php \
2322
artifacts/debian/control \
2423
artifacts/bintray.json \
2524
doc/installation.md
26-
@sed -i -r "s/([0-9]{4}\-[0-9]{2}\-[0-9]{2})/`date +%Y-%m-%d`/g" artifacts/bintray.json
27-
@make changelog-deb
25+
sed -i -r "s/([0-9]{4}\-[0-9]{2}\-[0-9]{2})/`date +%Y-%m-%d`/g" artifacts/bintray.json
26+
make changelog-deb
2827

2928

3029
# Tag git with last release
3130
new_git_version: build tag
32-
git add .semver .github/ISSUE_TEMPLATE/Bug_report.md .github/ISSUE_TEMPLATE/Feature_request.md src/functions.php doc/installation.md artifacts/* releases/*
31+
git add .github/ISSUE_TEMPLATE/Bug_report.md .github/ISSUE_TEMPLATE/Feature_request.md src/functions.php doc/installation.md artifacts/* releases/*
3332
git commit -m "releasing `semver tag`"
34-
git tag `semver tag` -m "releasing `semver tag`"
33+
git tag $(TAG) -m "releasing $(TAG)"
3534
git push -u origin master
36-
git push origin `semver tag`
35+
git push origin $(TAG)
3736

3837
docker:
39-
docker build -t phpmetrics/releasing ./docker/releasing
38+
docker build -t phpmetrics/releasing ./artifacts/releasing
4039

4140
# Publish new release. Usage:
42-
# make tag VERSION=(major|minor|patch)
41+
# make tag TAG=x.y.z
4342
release: docker
44-
docker run -it --rm --mount type=bind,source=$$SSH_AUTH_SOCK,target=/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent -v ~/.gitconfig:/etc/gitconfig -v $(PWD):/app -w /app phpmetrics/releasing make new_git_version VERSION=$(VERSION)
43+
docker run -it --rm --mount type=bind,source=$$SSH_AUTH_SOCK,target=/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent -v ~/.gitconfig:/etc/gitconfig -v $(PWD):/app -w /app phpmetrics/releasing make new_git_version TAG=$(TAG)

artifacts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ prepare-build:
1414
@rm -f ${BUILD_DIR}/phpmetrics.phar
1515

1616
build: prepare-build build-phar build-deb build-standalone
17+
./vendor/bin/phpunit -c phpunit.xml.dist --group=binary && echo "Done"
1718

docker/releasing/Dockerfile renamed to artifacts/releasing/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM composer/composer:2-bin AS composer
22

33
# please do not use alpine here: We need a debian based image for .deb distribution
4-
FROM php:7.4-cli-bullseye
4+
FROM php:8.4-cli-bullseye
55

66
# Installing ruby, semver and required dependencies
77
RUN apt update \
@@ -11,6 +11,11 @@ RUN apt update \
1111

1212
RUN git config --global --add safe.directory /app
1313

14+
# Installing musl-wrapper
15+
RUN apt install -y musl-dev musl-tools \
16+
&& ln -s /usr/bin/musl-gcc /usr/local/bin/musl-gcc \
17+
&& ln -s /usr/bin/musl-g++ /usr/local/bin/musl-g++
18+
1419
# Installing composer
1520
ENV COMPOSER_ALLOW_SUPERUSER=1
1621
ENV PATH="${PATH}:/root/.composer/vendor/bin"

artifacts/standalone/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build-standalone: build-standalone-linux
33
build-standalone-linux:
44
mkdir -p ${BUILD_DIR}
55
curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-linux-x86_64.tar.gz && tar -zxvf spc.tgz && rm spc.tgz
6+
./spc doctor --auto-fix
67
./spc download --with-php=8.4 --for-extensions "apcu,phar,curl,dom,fileinfo,filter,intl,mbstring,mysqlnd,openssl,tokenizer,zlib" --prefer-pre-built
78
./spc install-pkg upx
89
./spc build --build-micro "apcu,phar,curl,dom,fileinfo,filter,intl,mbstring,mysqlnd,openssl,tokenizer,zlib" --with-upx-pack

doc/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ These commands will create `phar`, `debian` and `binary` release,
4949
then run all tests and push new release to Github:
5050

5151
```bash
52-
make release VERSION=<VERSION>
53-
# <VERSION> can be `major`, `minor` or `patch`
52+
make release TAG=<vx.y.z>
53+
# where x is the major version, y is the minor version and z is the patch version
5454
```

doc/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ export PATH=~/.composer/vendor/bin:$PATH
1616
## Phar
1717

1818
```bash
19-
curl https://github.com/phpmetrics/PhpMetrics/releases/download/v2.8.2/phpmetrics.phar
19+
curl https://github.com/phpmetrics/PhpMetrics/releases/download/v2.9.0/phpmetrics.phar
2020
chmod +x phpmetrics.phar && mv phpmetrics.phar /usr/local/bin/phpmetrics
2121
```
2222

2323
## Apt (Debian, Ubuntu...)
2424

2525
```bash
26-
curl https://github.com/phpmetrics/PhpMetrics/releases/download/v2.8.2/phpmetrics.deb
26+
curl https://github.com/phpmetrics/PhpMetrics/releases/download/v2.9.0/phpmetrics.deb
2727
dpkg -i phpmetrics.deb
2828
```
2929

0 commit comments

Comments
 (0)