Skip to content

Commit

Permalink
Work on 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswessels committed Oct 4, 2015
1 parent 73480c1 commit 5cb897b
Show file tree
Hide file tree
Showing 14 changed files with 168 additions and 124 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Change log

### 1.0.0 (2015-10-04)

Bundles:

- Node.js 0.10.40
- Tupperbuild 1.0.0
- Quickstart 0.1.1
- PhantomJS 1.9.8 (optional)
- ImageMagick 8:6.7.7.10-5+deb7u3 (optional)

### 0.1.2 (2015-07-23)

- Updated Node.js.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Default configuration options:

## Comparison with meteord

1. meteor-tupperware produces smaller images (base of 170MB vs 220MB) than meteord.
1. meteor-tupperware produces smaller images than meteord.

1. meteor-tupperware supports configuring additional build flags (like --mobile-settings or --server). meteord is not this flexible.

Expand Down
2 changes: 1 addition & 1 deletion includes/scripts/_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export IMAGE_UTILS="git wget curl ca-certificates sudo bzip2"
# Function for checking process return codes
check_code () {
if [ ! "$1" -eq 0 ]; then
echo "! Failure. Exiting..."
echo "[!] Failure. Exiting..."
exit 1
fi
}
8 changes: 4 additions & 4 deletions includes/scripts/_install_deps.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/sh

echo "> Updating system..."
echo "[-] Updating system..."

# System update
# Lists update
apt-get update
check_code $?

echo "> Installing build dependencies... $BUILD_DEPS"
echo "[-] Installing build dependencies... $BUILD_DEPS"

# Build deps (to be removed in cleanup.sh)
apt-get install -y --no-install-recommends $BUILD_DEPS
check_code $?

echo "> Installing image utils... $IMAGE_UTILS"
echo "[-] Installing image utils... $IMAGE_UTILS"

# Sys utils
apt-get install -y --no-install-recommends $IMAGE_UTILS
Expand Down
2 changes: 1 addition & 1 deletion includes/scripts/_install_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NODE_DIST=node-v${NODE_VERSION}-linux-x64

echo "> Installing Node.js... $NODE_DIST"
echo "[-] Installing Node.js... $NODE_DIST"

cd /tmp

Expand Down
19 changes: 19 additions & 0 deletions includes/scripts/_on_build_cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh

# Remove apt lists
rm -rf /var/lib/apt/lists/*

# Locale cleanup
cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/

# Clean out docs
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo /var/cache/debconf/*-old

# Clean out package management dirs
rm -rf /var/lib/cache /var/lib/log

# Clean out /tmp
rm -rf /tmp/*

# Clear npm cache
npm cache clear
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
#!/bin/sh

echo "> Purging build dependencies..."

# Purge build deps
apt-get purge -y $BUILD_DEPS
apt-get remove --purge -y $BUILD_DEPS
check_code $?

# Autoremove any junk
apt-get clean -y
apt-get autoclean -y
apt-get autoremove -y
check_code $?

echo "> Cleaning out docs, pkg management cruft and /tmp..."
# Remove apt lists
rm -rf /var/lib/apt/lists/*
check_code $?

# Locale cleanup
cp -R /usr/share/locale/en\@* /tmp/ && rm -rf /usr/share/locale/* && mv /tmp/en\@* /usr/share/locale/

# Clean out docs
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo
rm -rf /usr/share/doc /usr/share/doc-base /usr/share/man /usr/share/locale /usr/share/zoneinfo /var/cache/debconf/*-old

# Clean out package management dirs
rm -rf /var/lib/cache /var/lib/log

# Clean out /tmp
rm -rf /tmp/*

echo "> Clearing npm cache"
# Clear npm cache
npm cache clear
14 changes: 14 additions & 0 deletions includes/scripts/_pre_clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

echo "[-] Performing image cleanup..."

# Purge packages
apt-get purge -y `apt-mark showauto`
apt-get remove --purge -y `apt-mark showauto`
check_code $?

# Autoremove any junk
apt-get clean -y
apt-get autoclean -y
apt-get autoremove -y
check_code $?
2 changes: 1 addition & 1 deletion includes/scripts/_setup_tupperbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd $TUPPERBUILD_DIR

echo "> Setting up tupperbuild..."
echo "[-] Setting up tupperbuild..."

npm install
check_code $?
Expand Down
4 changes: 3 additions & 1 deletion includes/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ BASEDIR=`dirname $0`

. $BASEDIR/_common.sh

. $BASEDIR/_pre_clean.sh

. $BASEDIR/_install_deps.sh

. $BASEDIR/_install_node.sh

. $BASEDIR/_setup_tupperbuild.sh

. $BASEDIR/_cleanup_deps.sh
. $BASEDIR/_post_clean.sh
2 changes: 1 addition & 1 deletion includes/scripts/on_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ BASEDIR=`dirname $0`
node $TUPPERBUILD_DIR/main.js $1
check_code $?

rm -rf /tmp/*
. $BASEDIR/_cleanup_deps.sh
4 changes: 2 additions & 2 deletions includes/scripts/start_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BASEDIR=`dirname $0`
. $BASEDIR/_common.sh

if [ ! -f $OUTPUT_DIR/bundle/main.js ]; then
echo "There is no bundle. Please see usage docs here: https://github.com/chriswessels/meteor-tupperware"
echo "[!] There is no application bundle. Please see usage docs here: https://github.com/chriswessels/meteor-tupperware"
exit 1
fi

Expand All @@ -19,6 +19,6 @@ if [ -z "$METEOR_ENV" ]; then
export METEOR_ENV="production"
fi

echo "> meteor-tupperware is starting your application with NODE_ENV=$NODE_ENV and METEOR_ENV=$METEOR_ENV..."
echo "[-] meteor-tupperware is starting your application with NODE_ENV=$NODE_ENV and METEOR_ENV=$METEOR_ENV..."

exec node $OUTPUT_DIR/bundle/main.js "$@"
Loading

0 comments on commit 5cb897b

Please sign in to comment.