Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Commit

Permalink
moved app to its own repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Jul 4, 2018
1 parent 2e67866 commit 5415b43
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 276 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
build
*.egg-info
qemu-*-static
dist
*.yaml
.Dockerfile
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ before_install:

script:
- echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_LOGIN" --password-stdin
- make build-docker
- make build

deploy:
provider: script
script:
- make publish-docker latest
- make publish latest
on:
branch: master
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ How to Contribute

This project welcomes your contribution. There are several ways to help out:

* Create an [issue](https://github.com/femtopixel/docker-google-closure-compiler-api/issues/) on GitHub,
* Create an [issue](https://github.com/femtopixel/docker-google-closure-compiler-app/issues/) on GitHub,
if you have found a bug or have an idea for a feature
* Write test cases for open bug issues
* Write patches for open bug/feature issues

Issues
------

* Submit an [issue](https://github.com/femtopixel/docker-google-closure-compiler-api/issues/)
* Submit an [issue](https://github.com/femtopixel/docker-google-closure-compiler-app/issues/)
* Make sure it does not already exist.
* Clearly describe the issue including steps to reproduce, when it is a bug.
* Make sure you note the version you use.

Additional Resources
--------------------

* [Existing issues](https://github.com/femtopixel/docker-google-closure-compiler-api/issues/)
* [Existing issues](https://github.com/femtopixel/docker-google-closure-compiler-app/issues/)
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
FROM python:alpine3.6 as builder
FROM openjdk:jre-alpine as builder

COPY qemu-*-static /usr/bin/

FROM builder

ARG VERSION=webpack-v20180702
LABEL maintainer="Jay MOULIN <jaymoulin@gmail.com> <https://twitter.com/MoulinJay>"
LABEL version=${VERSION}

RUN pip install google-closure-compiler-api
RUN apk add wget unzip --update --virtual .build-deps && \
wget "https://dl.google.com/closure-compiler/compiler-latest.zip" && \
unzip "compiler-latest.zip" && \
mv *.jar /bin/compiler.jar && \
apk del wget --purge .build-deps
COPY ./entrypoint.sh /bin/entrypoint
ENTRYPOINT ["/bin/entrypoint"]
CMD ["google-closure-compiler"]
CMD ["java", "-jar", "/bin/compiler.jar"]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 FemtoPixel
Copyright (c) 2018 FemtoPixel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 11 additions & 27 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
VERSION ?= v20180319
CACHE ?= --no-cache=1
FULLVERSION ?= v20180319
archs ?= amd64 i386 arm64v8 arm32v6
VERSION ?= webpack-v20180702
FULLVERSION ?= ${VERSION}
archs = amd64 arm32v6 arm64v8 i386

.PHONY: docker build-docker publish-docker latest
test: install
twine upload -r testpypi dist/*
publish: install
twine upload dist/*
install: clean check
sudo python3 setup.py sdist
check:
python3 setup.py check --restructuredtext
.PHONY: all build publish latest
all: build publish latest
build:
mkdir -p build
dist:
mkdir -p dist
clean: build dist
sudo rm -Rf build/*
sudo rm -Rf dist/*
docker: build-docker publish-docker latest
build-docker:
cp /usr/bin/qemu-*-static .
$(foreach arch,$(archs), \
cat Dockerfile | sed "s/FROM python:alpine/FROM ${arch}\/python:alpine/g" > .Dockerfile; \
docker build -t femtopixel/google-closure-compiler:${VERSION}-$(arch) -f .Dockerfile ${CACHE} .;\
cat Dockerfile | sed "s/FROM openjdk:jre-alpine/FROM ${arch}\/openjdk:jre-alpine/g" > .Dockerfile; \
docker build -t femtopixel/google-closure-compiler-app:${VERSION}-$(arch) --build-arg VERSION=${VERSION} -f .Dockerfile .;\
)
publish-docker:
docker push femtopixel/google-closure-compiler
publish:
docker push femtopixel/google-closure-compiler-app
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
mv manifest2.yaml manifest.yaml
manifest-tool push from-spec manifest.yaml
latest: build-docker
FULLVERSION=latest VERSION=${VERSION} make publish-docker
latest: build
FULLVERSION=latest VERSION=${VERSION} make publish
2 changes: 1 addition & 1 deletion app/README.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Google Closure Compiler APP - Docker Image
==========================================

[![latest release](https://img.shields.io/github/release/femtopixel/docker-google-closure-compiler-api.svg "latest release")](http://github.com/femtopixel/docker-google-closure-compiler-api/releases)
[![latest release](https://img.shields.io/github/release/femtopixel/docker-google-closure-compiler-app.svg "latest release")](http://github.com/femtopixel/docker-google-closure-compiler-app/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/femtopixel/google-closure-compiler-app.svg)](https://hub.docker.com/r/femtopixel/google-closure-compiler-app/)
[![Docker Stars](https://img.shields.io/docker/stars/femtopixel/google-closure-compiler-app.svg)](https://hub.docker.com/r/femtopixel/google-closure-compiler-app/)
[![Bitcoin donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/btc.png "Bitcoin donation")](https://m.freewallet.org/id/374ad82e/btc)
Expand Down
67 changes: 0 additions & 67 deletions README.rst

This file was deleted.

3 changes: 0 additions & 3 deletions app/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions app/Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions app/Makefile

This file was deleted.

8 changes: 0 additions & 8 deletions app/entrypoint.sh

This file was deleted.

Binary file removed app/logo.png
Binary file not shown.
29 changes: 0 additions & 29 deletions app/manifest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
if [ "${1#-}" != "$1" ]; then
set -- google-closure-compiler "$@"
set -- java -jar /bin/compiler.jar "$@"
fi

exec "$@"
5 changes: 0 additions & 5 deletions google_closure_compiler_api/__init__.py

This file was deleted.

47 changes: 0 additions & 47 deletions google_closure_compiler_api/compiler.py

This file was deleted.

Binary file modified logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
image: femtopixel/google-closure-compiler:$FULLVERSION
image: femtopixel/google-closure-compiler-app:$FULLVERSION
manifests:
-
image: femtopixel/google-closure-compiler:$VERSION-arm32v6
image: femtopixel/google-closure-compiler-app:$VERSION-arm32v6
platform:
architecture: arm
variant: v6
os: linux
-
image: femtopixel/google-closure-compiler:$VERSION-arm64v8
image: femtopixel/google-closure-compiler-app:$VERSION-arm64v8
platform:
architecture: arm64
os: linux
-
image: femtopixel/google-closure-compiler:$VERSION-arm64v8
image: femtopixel/google-closure-compiler-app:$VERSION-arm64v8
platform:
architecture: arm
variant: v8
os: linux
-
image: femtopixel/google-closure-compiler:$VERSION-amd64
image: femtopixel/google-closure-compiler-app:$VERSION-amd64
platform:
architecture: amd64
os: linux
-
image: femtopixel/google-closure-compiler:$VERSION-i386
image: femtopixel/google-closure-compiler-app:$VERSION-i386
platform:
architecture: 386
os: linux
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit 5415b43

Please sign in to comment.