-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build RPM packages + clean up Debian package dependencies + exclude t…
…ests from sdist tarball (#71) + drop support for make
- Loading branch information
1 parent
f70a6cf
commit e09248a
Showing
19 changed files
with
112 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
git-machete | ||
|
||
*.pyc | ||
*.swp | ||
.idea/ | ||
|
||
.tox/ | ||
*.egg-info/ | ||
.eggs/ | ||
.stestr/ | ||
|
||
build/ | ||
dist/ | ||
AUTHORS | ||
ChangeLog | ||
|
||
.idea/ | ||
build/ | ||
dist/ | ||
*.egg-info/ | ||
.eggs/ | ||
.python-version | ||
*.pyc | ||
.tox/ | ||
.stestr/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
include LICENSE | ||
|
||
# Needed for the Homebrew formula to install the completion scripts correctly | ||
recursive-include completion * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Can be used by docker-compose for building the `ppa-upload` image locally | ||
# Can be used by docker-compose for building the `virtuslab/git-machete-ci-apt-ppa-upload` image locally | ||
USER_ID=1000 | ||
GROUP_ID=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Can be used by docker-compose for building the `virtuslab/git-machete-ci-rpm` image locally | ||
USER_ID=1000 | ||
GROUP_ID=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM fedora:31 | ||
|
||
RUN dnf install -y python rpm-build | ||
|
||
ARG user_id | ||
ARG group_id | ||
RUN "[" ${user_id:-0} -ne 0 ] \ | ||
&& [ ${group_id:-0} -ne 0 ] \ | ||
&& groupadd -g ${group_id} ci-user \ | ||
&& useradd -l -u ${user_id} -g ci-user ci-user \ | ||
&& install -d -m 0755 -o ci-user -g ci-user /home/ci-user | ||
USER ci-user | ||
COPY --chown=ci-user:ci-user entrypoint.sh /home/ci-user/ | ||
RUN chmod +x ~/entrypoint.sh | ||
CMD ["/home/ci-user/entrypoint.sh"] | ||
WORKDIR /home/ci-user/git-machete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Builing the RPM locally | ||
|
||
```shell script | ||
cd ci/rpm | ||
cp .env-sample .env # and optionally edit if needed to match your current user's UID/GID | ||
docker-compose up --build rpm | ||
# the artifacts will be located in dist/ folder in top-level project directory | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
{ [[ -f setup.py ]] && grep -q "name='git-machete'" setup.py; } || { | ||
echo "Error: the repository should be mounted as a volume under $(pwd)" | ||
exit 1 | ||
} | ||
|
||
set -x | ||
|
||
python setup.py bdist_rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3' | ||
services: | ||
rpm: | ||
image: virtuslab/git-machete-ci-rpm:${DOCKER_TAG:-latest} | ||
build: | ||
context: build-context | ||
dockerfile: ${PWD}/Dockerfile | ||
args: | ||
- user_id=${USER_ID:-0} | ||
- group_id=${GROUP_ID:-0} | ||
volumes: | ||
- ${PWD}/../..:/home/ci-user/git-machete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e -o pipefail -u -x | ||
|
||
DOCKER_TAG=$(git rev-parse HEAD:ci/rpm/) | ||
export DOCKER_TAG | ||
cd ci/rpm/ | ||
|
||
# If the image corresponding to the current state of ci/rpm/ is missing, build it and push to Docker Hub. | ||
docker-compose pull rpm || { | ||
docker-compose build --build-arg user_id="$(id -u)" --build-arg group_id="$(id -g)" rpm | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
docker-compose push rpm | ||
} | ||
|
||
docker-compose up --exit-code-from=rpm rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env python | ||
|
||
from git_machete import cmd | ||
cmd.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.12.9' | ||
__version__ = '2.12.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters