Skip to content

Commit

Permalink
latest versions
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <acidburn@google.com>
  • Loading branch information
jessfraz committed Oct 8, 2016
1 parent 4c8d199 commit 78ecf69
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cpuminer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RUN apk add --no-cache \
curl \
openssl

ENV CPUMINER_VERSION v2.4.5
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
autoconf \
Expand All @@ -14,7 +15,7 @@ RUN set -x \
curl-dev \
git \
openssl-dev \
&& git clone --depth 1 https://github.com/pooler/cpuminer.git /usr/src/cpuminer \
&& git clone --branch "${CPUMINER_VERSION}" https://github.com/pooler/cpuminer.git /usr/src/cpuminer \
&& ( \
cd /usr/src/cpuminer \
&& ./autogen.sh \
Expand Down
2 changes: 1 addition & 1 deletion irssi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN adduser -u 1001 -D user \

ENV LANG C.UTF-8

ENV IRSSI_VERSION 0.8.19
ENV IRSSI_VERSION 0.8.20
ENV LIB_OTR_VERSION 4.1.1
ENV IRSSI_OTR_VERSION 1.0.1
ENV PATCH_FOR_IRSSI_OTR https://github.com/cryptodotis/irssi-otr/commit/d03ab59b6f27142c1c5e99fedc635a589b1607bb.diff
Expand Down
64 changes: 64 additions & 0 deletions latest-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This script gets the latest GitHub releases for the specified projects.
#!/bin/bash
set -e

if [[ -z "$GITHUB_TOKEN" ]]; then
echo "Set the GITHUB_TOKEN env variable."
exit 1
fi

URI=https://api.github.com
API_VERSION=v3
API_HEADER="Accept: application/vnd.github.${API_VERSION}+json"
AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}"

get_latest() {
local repo=$1

local resp=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${repo}/releases/latest")
local tag=$(echo $resp | jq --raw-output .tag_name)
local name=$(echo $resp | jq --raw-output .name)

if [[ "$tag" == "null" ]]; then
# get the latest tag
local resp=$(curl -sSL -H "${AUTH_HEADER}" -H "${API_HEADER}" "${URI}/repos/${repo}/tags")
local tag=$(echo $resp | jq --raw-output .[0].name)
fi

local dir=${repo#*/}
local current=$(cat "${dir}/Dockerfile" | grep -m 1 VERSION | awk '{print $(NF)}')

if [[ "$tag" =~ "$current" ]]; then
echo -e "\e[36m${dir}:\e[39m current ${current} | ${tag} | ${name}"
else
echo -e "\e[31m${dir}:\e[39m current ${current} | ${tag} | ${name} | https://github.com/${repo}/releases"
fi
}

projects=(
apache/zookeeper
atom/atom
camlistore/camlistore
curl/curl
hashicorp/consul
hashicorp/vault
irssi/irssi
JonnyWong16/plexpy
microsoft/vscode
mitchellh/vagrant
pooler/cpuminer
powershell/powershell
reverse-shell/routersploit
ricochet-im/ricochet
tarsnap/tarsnap
znc/znc
zyedidia/micro
)

main() {
for p in ${projects[@]}; do
get_latest "$p"
done
}

main
3 changes: 2 additions & 1 deletion plexpy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ RUN apk add --no-cache \
python

# Get the source
ENV PLEXPY_VERSION v1.4.12
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
git \
&& mkdir -p /opt/plexpy \
&& git clone https://github.com/drzoidberg33/plexpy.git /opt/plexpy/ \
&& git clone --branch "${PLEXPPY_VERSION}" https://github.com/drzoidberg33/plexpy.git /opt/plexpy/ \
&& apk del .build-deps

# Volume for Plexpy data.
Expand Down
4 changes: 3 additions & 1 deletion routersploit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM debian:sid
MAINTAINER Christian Koep <christian.koep@fom-net.de>

ENV ROUTERSPLOIT_VERSION v2.2.1

RUN apt-get update && apt-get install -y \
git \
python-requests \
Expand All @@ -9,7 +11,7 @@ RUN apt-get update && apt-get install -y \
python-bs4 \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/reverse-shell/routersploit /usr/bin/routersploit \
&& git clone --branch "${ROUTERSPLOIT_VERSION}" https://github.com/reverse-shell/routersploit /usr/bin/routersploit \
&& apt-get purge -y --auto-remove \
git

Expand Down
2 changes: 1 addition & 1 deletion vagrant/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

ENV VAGRANT_VERSION 1.8.5
ENV VAGRANT_VERSION 1.8.6

ADD https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb /src/vagrant_${VAGRANT_VERSION}_x86_64.deb

Expand Down
2 changes: 1 addition & 1 deletion vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV HOME /home/user
RUN useradd --create-home --home-dir $HOME user \
&& chown -R user:user $HOME

ENV CODE_VERSION 1.5.2
ENV CODE_VERSION 1.5.3
# download the source
RUN buildDeps=' \
ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion zookeeper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM java:8-alpine

ENV ZOOKEEPER_VERSION 3.4.8
ENV ZOOKEEPER_VERSION 3.4.9
ENV PATH $PATH:/opt/zookeeper/bin/

# the start files for zookeeper use bash
Expand Down

0 comments on commit 78ecf69

Please sign in to comment.