diff --git a/Makefile b/Makefile index fc52df4..6c3bea2 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ ifeq ($(I),composite) else ifneq (,$(filter $(I),admin ci)) docker build . -f docker/$(I)/Dockerfile -t riju:$(I) else - docker build . -f docker/$(I)/Dockerfile -t riju:$(I) --label riju.image-hash=$(shell node tools/hash-dockerfile.js $(I)) + hash="$$(node tools/hash-dockerfile.js $(I) | grep .)"; docker build . -f docker/$(I)/Dockerfile -t riju:$(I) --label riju.image-hash="$${hash}" endif .PHONY: script @@ -43,6 +43,10 @@ script: .PHONY: scripts scripts: + @: $${L} + node tools/make-foreach.js --types script L=$(L) + +.PHONY: all-scripts node tools/make-foreach.js --pkgs script .PHONY: pkg @@ -53,12 +57,23 @@ pkg: cd $(BUILD)/src && pkg="$(PWD)/$(BUILD)/pkg" ../build.bash fakeroot dpkg-deb --build $(BUILD)/pkg $(BUILD)/$(DEB) +.PHONY: pkgs +pkgs: + @: $${L} + node tools/make-foreach.js --types pkg L=$(L) + .PHONY: repkg repkg: @: $${L} $${T} + make script L=$(L) T=$(T) make shell I=packaging CMD="make pkg L=$(L) T=$(T)" ctr="$$(docker container ls -f label="riju-install-target=yes" -l -q)"; test "$${ctr}" || (echo "no valid container is live"; exit 1); docker exec "$${ctr}" make install L=$(L) T=$(T) +.PHONY: repkgs +repkgs: + @: $${L} + node tools/make-foreach.js --types repkg L=$(L) + ### Manipulate artifacts inside Docker VOLUME_MOUNT ?= $(PWD) @@ -172,7 +187,7 @@ upload: @: $${L} $${T} $${S3_BUCKET} aws s3 rm --recursive $(S3_HASH) aws s3 cp $(BUILD)/$(DEB) $(S3_DEB) - aws s3 cp - $(S3_HASH)/$(shell dpkg-deb -f $(BUILD)/$(DEB) Riju-Script-Hash) < /dev/null + hash="$$(dpkg-deb -f $(BUILD)/$(DEB) Riju-Script-Hash | grep .)"; aws s3 cp - "$(S3_HASH)/$${hash}" < /dev/null .PHONY: publish publish: diff --git a/deps/prettier.yaml b/deps/prettier.yaml new file mode 100644 index 0000000..6f11af6 --- /dev/null +++ b/deps/prettier.yaml @@ -0,0 +1,5 @@ +id: "prettier" + +install: + npm: + - prettier diff --git a/deps/sass.yaml b/deps/sass.yaml new file mode 100644 index 0000000..60892df --- /dev/null +++ b/deps/sass.yaml @@ -0,0 +1,5 @@ +id: "sass" + +install: + npm: + - sass diff --git a/docker/runtime/install.bash b/docker/runtime/install.bash index 382ffb5..c2aed00 100755 --- a/docker/runtime/install.bash +++ b/docker/runtime/install.bash @@ -10,22 +10,61 @@ pushd /tmp export DEBIAN_FRONTEND=noninteractive +dpkg --add-architecture i386 + apt-get update (yes || true) | unminimize apt-get install -y curl gnupg lsb-release -curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - -curl -sSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +# Ceylon +curl -fsSL https://downloads.ceylon-lang.org/apt/ceylon-debian-repo.gpg.key | apt-key add - + +# Crystal +curl -fsSL https://keybase.io/crystal/pgp_keys.asc | apt-key add - + +# Dart +curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - + +# Hack +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B4112585D386EB94 + +# Node.js +curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - + +# R +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 + +# Yarn +curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - ubuntu_ver="$(lsb_release -rs)" ubuntu_name="$(lsb_release -cs)" -node_repo="$(curl -sS https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" +cran_repo="$(curl -fsSL https://cran.r-project.org/bin/linux/ubuntu/ | grep '' | grep "${ubuntu_name}" | grep -Eo 'cran[0-9]+' | head -n1)" +node_repo="$(curl -fsSL https://deb.nodesource.com/setup_current.x | grep NODEREPO= | grep -Eo 'node_[0-9]+\.x' | head -n1)" tee -a /etc/apt/sources.list.d/custom.list >/dev/null <