-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
575a982
commit f3d53e4
Showing
32 changed files
with
289 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 `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
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 @@ | ||
## Automated PPA upload | ||
|
||
```shell script | ||
cd ci/apt-ppa | ||
cp .env-sample .env # and optionally edit if needed to match your current user's UID/GID | ||
. upload-export-vars | ||
docker-compose up --build ppa-upload | ||
``` | ||
|
||
|
||
## Test the availability of the uploaded package | ||
|
||
```shell script | ||
cd ci/apt-ppa | ||
docker-compose up --build ppa-test-install | ||
``` |
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,18 @@ | ||
version: '3' | ||
services: | ||
ppa-upload: | ||
image: virtuslab/git-machete-ci-ppa-upload:${DOCKER_TAG:-latest} | ||
build: | ||
context: . | ||
dockerfile: upload.Dockerfile | ||
args: | ||
- user_id=${USER_ID:-0} | ||
- group_id=${GROUP_ID:-0} | ||
volumes: | ||
- ${PWD}/../..:/home/ci-user/git-machete | ||
env_file: | ||
- upload-vars.env | ||
ppa-test-install: | ||
build: | ||
context: . | ||
dockerfile: test-install.Dockerfile |
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,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e -x | ||
|
||
apt-get update | ||
apt-get install -y python3-git-machete | ||
git machete --version | ||
apt-get purge -y python3-git-machete | ||
! command -v 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 @@ | ||
FROM ubuntu | ||
|
||
RUN apt-get update && apt-get install -y git software-properties-common | ||
RUN add-apt-repository ppa:virtuslab/git-machete | ||
|
||
COPY test-install-entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
CMD ["/entrypoint.sh"] |
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,7 @@ | ||
|
||
; We need to use SFTP since FTP is insecure & completely blocked on Travis | ||
[ppa] | ||
fqdn = ppa.launchpad.net | ||
method = sftp | ||
incoming = ~virtuslab/ubuntu/git-machete/ | ||
login = virtuslab |
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,29 @@ | ||
#!/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 -e -o pipefail -u | ||
echo "$GPG_PRIVATE_KEY_PASSPHRASE" > ~/.gnupg/passphrase.txt | ||
echo "$GPG_PRIVATE_KEY_CONTENTS_BASE64" | base64 -d > ~/.gnupg/private-keys-v1.d/"$GPG_PRIVATE_KEY_ID".key | ||
echo "$GPG_PUBRING_KEYBOX_CONTENTS_BASE64" | base64 -d > ~/.gnupg/pubring.kbx | ||
echo "$GPG_TRUSTDB_GPG_CONTENTS_BASE64" | base64 -d > ~/.gnupg/trustdb.gpg | ||
echo "$SSH_PRIVATE_KEY_CONTENTS_BASE64" | base64 -d > ~/.ssh/id_rsa | ||
chmod 700 ~/.ssh/id_rsa | ||
|
||
set -x | ||
VERSION=$(cut -d\' -f2 git_machete/__init__.py) | ||
export VERSION | ||
envsubst '$VERSION' < debian/files.envsubst > debian/files | ||
cp LICENSE debian/copyright | ||
# The first version ever released to PPA is 2.12.7, so we skip everything older than that from the changelog. | ||
sed '/## New in git-machete 2\.12\.6/,$d' RELEASE_NOTES.md | awk -f ~/release-notes-to-changelog.awk > debian/changelog | ||
|
||
# Since we upload over SFTP, we need to whitelist the host first to avoid the prompt. | ||
ssh-keyscan ppa.launchpad.net > ~/.ssh/known_hosts | ||
|
||
# -p flag points to a script that wraps gpg so that we don't get asked for password to the private key on TTY. | ||
debuild -S -p"$HOME/gpg-sign.sh" | ||
dput ppa:virtuslab/git-machete ../python3-git-machete_*_source.changes |
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,7 @@ | ||
|
||
export GPG_PRIVATE_KEY_PASSPHRASE=$(cat ~/.gnupg/passphrase.txt) | ||
export GPG_PRIVATE_KEY_ID=$(basename --suffix=.key ~/.gnupg/private-keys-v1.d/*.key) | ||
export GPG_PRIVATE_KEY_CONTENTS_BASE64=$(base64 --wrap=0 ~/.gnupg/private-keys-v1.d/$GPG_PRIVATE_KEY_ID.key) | ||
export GPG_PUBRING_KEYBOX_CONTENTS_BASE64=$(base64 --wrap=0 ~/.gnupg/pubring.kbx) | ||
export GPG_TRUSTDB_GPG_CONTENTS_BASE64=$(base64 --wrap=0 ~/.gnupg/trustdb.gpg) | ||
export SSH_PRIVATE_KEY_CONTENTS_BASE64=$(base64 --wrap=0 ~/.ssh/launchpad/id_rsa) |
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 bash | ||
|
||
# --pinentry-mode=loopback is the only option (--batch, --yes, --passphrase-fd 0 all had no effect) that makes it possible for gpg NOT to ask for password via a TTY within Docker context. | ||
gpg --pinentry-mode=loopback --passphrase-file="$HOME/.gnupg/passphrase.txt" "$@" |
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,23 @@ | ||
# Requires GNU awk (gawk) due to the use of |& | ||
|
||
function trailer(v) { | ||
"git log -1 --date=rfc2822 --format=%cd v" v " 2>/dev/null || date --rfc-email" |& getline date | ||
printf "\n -- Pawel Lipski <[email protected]> %s\n\n\n", date | ||
} | ||
|
||
/## New in git-machete .*/ { | ||
if (version) { | ||
trailer(version) | ||
} | ||
match($0, /[0-9.]+/) | ||
newVersion = substr($0, RSTART, RLENGTH) | ||
version = newVersion | ||
print "python3-git-machete (" version ") bionic; urgency=medium\n" | ||
} | ||
|
||
/^- / { | ||
gsub("^- ", " * ") | ||
print $0 | ||
} | ||
|
||
END { trailer(version) } |
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/apt-ppa/) | ||
export DOCKER_TAG | ||
cd ci/apt-ppa/ | ||
|
||
# If the image corresponding to the current state of ci/apt-ppa/ is missing, build it and push to Docker Hub. | ||
docker-compose pull ppa-upload || { | ||
docker-compose build --build-arg user_id="$(id -u)" --build-arg group_id="$(id -g)" ppa-upload | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
docker-compose push ppa-upload | ||
} | ||
|
||
docker-compose up --exit-code-from=ppa-upload ppa-upload |
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,6 @@ | ||
GPG_PRIVATE_KEY_PASSPHRASE | ||
GPG_PRIVATE_KEY_ID | ||
GPG_PRIVATE_KEY_CONTENTS_BASE64 | ||
GPG_PUBRING_KEYBOX_CONTENTS_BASE64 | ||
GPG_TRUSTDB_GPG_CONTENTS_BASE64 | ||
SSH_PRIVATE_KEY_CONTENTS_BASE64 |
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,29 @@ | ||
FROM ubuntu | ||
|
||
RUN apt-get update && apt-get install -y debhelper devscripts fakeroot gawk python3-all python3-paramiko python3-setuptools | ||
|
||
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 | ||
|
||
RUN install -d -m 0700 ~/.gnupg/ ~/.gnupg/private-keys-v1.d/ ~/.ssh/ | ||
|
||
COPY upload-dput.cf /etc/dput.cf | ||
|
||
COPY --chown=ci-user:ci-user upload-gpg-sign.sh /home/ci-user/gpg-sign.sh | ||
RUN chmod +x ~/gpg-sign.sh | ||
|
||
COPY --chown=ci-user:ci-user upload-release-notes-to-changelog.awk /home/ci-user/release-notes-to-changelog.awk | ||
|
||
COPY --chown=ci-user:ci-user upload-entrypoint.sh /home/ci-user/entrypoint.sh | ||
RUN chmod +x ~/entrypoint.sh | ||
CMD ["/home/ci-user/entrypoint.sh"] | ||
|
||
WORKDIR /home/ci-user/git-machete |
0
ci/homebrew-git-push.sh → ci/homebrew-tap/travis-deploy.sh
100755 → 100644
File renamed without changes.
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 @@ | ||
# These files are automatically generated by ci/apt-ppa/upload-entrypoint.sh: debian/changelog from RELEASE_NOTES.md, debian/copyright from LICENSE, debian/files from debian/files.envsubst | ||
changelog | ||
copyright | ||
files |
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 |
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 @@ | ||
Source: python3-git-machete | ||
Maintainer: Pawel Lipski <[email protected]> | ||
Build-Depends: debhelper,dh-python,python3-all,python3-setuptools | ||
Section: devel | ||
Priority: optional | ||
Standards-Version: 4.1.4 | ||
X-Python3-Version: >= 3.6 | ||
|
||
Package: python3-git-machete | ||
Architecture: any | ||
Description: Probably the sharpest git repository organizer & rebase workflow automation tool you've ever seen | ||
Depends: ${python3:Depends}, python3-pkg-resources |
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 @@ | ||
python3-git-machete_$VERSION_source.buildinfo devel optional |
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,7 @@ | ||
#!/usr/bin/make -f | ||
|
||
#export DH_VERBOSE = 1 | ||
export PYBUILD_NAME = git-machete | ||
|
||
%: | ||
dh $@ --with python3 --buildsystem=pybuild |
Oops, something went wrong.