Anonymous stats

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2015-08-05 14:10:09 -07:00
parent 0738862c0d
commit 51fa7d0c42
3 changed files with 32 additions and 14 deletions

View File

@ -41,11 +41,13 @@ RUN chmod +x /docker-compose
ENV BOOT2DOCKER_ISO_VERSION $DOCKER_VERSION ENV BOOT2DOCKER_ISO_VERSION $DOCKER_VERSION
RUN curl -fsSL -o /boot2docker.iso https://github.com/tianon/boot2docker-legacy/releases/download/v1.8.0-rc2/boot2docker.iso RUN curl -fsSL -o /boot2docker.iso https://github.com/tianon/boot2docker-legacy/releases/download/v1.8.0-rc2/boot2docker.iso
ENV KITEMATIC_VERSION 0.8.0-rc3 ENV KITEMATIC_VERSION 0.8.0-rc4
RUN curl -fsSL -o /kitematic.zip https://github.com/kitematic/kitematic/releases/download/v$KITEMATIC_VERSION/Kitematic-$KITEMATIC_VERSION-Mac.zip RUN curl -fsSL -o /kitematic.zip https://github.com/kitematic/kitematic/releases/download/v$KITEMATIC_VERSION/Kitematic-$KITEMATIC_VERSION-Mac.zip
# ENV INSTALLER_VERSION $DOCKER_VERSION # ENV INSTALLER_VERSION $DOCKER_VERSION
ENV INSTALLER_VERSION 1.8.0-rc4 ENV INSTALLER_VERSION 1.8.0-rc5
ENV MIXPANEL_TOKEN c306ae65c33d7d09fe3e546f36493a6e
# Start building package # Start building package
@ -123,6 +125,10 @@ RUN cd /mpkg/dockercompose.pkg && \
# boot2dockeriso.pkg # boot2dockeriso.pkg
RUN cd /mpkg/boot2dockeriso.pkg && \ RUN cd /mpkg/boot2dockeriso.pkg && \
export EVENT_DATA=$(echo "{\"event\":\"Installer Finished\",\"properties\":{\"token\":\"$MIXPANEL_TOKEN\",\"version\":\"$INSTALLER_VERSION\",\"os\":\"darwin\"}}" | base64 | tr -d '\n') && \
sed -i \
-e "s/%EVENT_DATA%/$EVENT_DATA/g" \
./Scripts/postinstall && \
cd Scripts && find . | cpio -o --format odc | gzip -c > ../Scripts.bin && cd .. && \ cd Scripts && find . | cpio -o --format odc | gzip -c > ../Scripts.bin && cd .. && \
rm -r Scripts && mv Scripts.bin Scripts && \ rm -r Scripts && mv Scripts.bin Scripts && \
mkdir ./rootfs && \ mkdir ./rootfs && \
@ -178,8 +184,9 @@ RUN sed -i \
RUN sed -i \ RUN sed -i \
-e "s/%INSTALLER_VERSION%/$INSTALLER_VERSION/g" \ -e "s/%INSTALLER_VERSION%/$INSTALLER_VERSION/g" \
mpkg/Resources/en.lproj/Installed.html mpkg/Resources/en.lproj/Installed.html
RUN sed -i \ RUN export EVENT_DATA=$(echo "{\"event\":\"Installer Started\",\"properties\":{\"token\":\"$MIXPANEL_TOKEN\",\"version\":\"$INSTALLER_VERSION\",\"os\":\"darwin\"}}" | base64 | tr -d '\n') && \
-e "s/%INSTALLER_VERSION%/$INSTALLER_VERSION/g" \ sed -i \
-e "s/%EVENT_DATA%/$EVENT_DATA/g" \
/mpkg/Distribution && \ /mpkg/Distribution && \
sed -i \ sed -i \
-e "s/%VBOX_VERSION%/$VBOX_VERSION/g" \ -e "s/%VBOX_VERSION%/$VBOX_VERSION/g" \

View File

@ -10,10 +10,10 @@
<line choice="choiceDockerCLI"/> <line choice="choiceDockerCLI"/>
<line choice="choiceDockerMachineCLI"/> <line choice="choiceDockerMachineCLI"/>
<line choice="choiceDockerComposeCLI"/> <line choice="choiceDockerComposeCLI"/>
<line choice="choiceBoot2DockerISO"/>
<line choice="choiceDockerQuickstartTerminalAPP"/> <line choice="choiceDockerQuickstartTerminalAPP"/>
<line choice="choiceKitematicAPP"/> <line choice="choiceKitematicAPP"/>
<line choice="choiceVBox"/> <line choice="choiceVBox"/>
<line choice="choiceBoot2DockerISO"/>
</choices-outline> </choices-outline>
<choice id="choiceDockerCLI" title="choiceDockerCLI_title" description="choiceDockerCLI_msg" start_selected="true" start_enabled="true" start_visible="true"> <choice id="choiceDockerCLI" title="choiceDockerCLI_title" description="choiceDockerCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.docker"/> <pkg-ref id="io.docker.pkg.docker"/>
@ -24,9 +24,6 @@
<choice id="choiceDockerComposeCLI" title="choiceDockerComposeCLI_title" description="choiceDockerComposeCLI_msg" start_selected="true" start_enabled="true" start_visible="true"> <choice id="choiceDockerComposeCLI" title="choiceDockerComposeCLI_title" description="choiceDockerComposeCLI_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockercompose"/> <pkg-ref id="io.docker.pkg.dockercompose"/>
</choice> </choice>
<choice id="choiceBoot2DockerISO" title="choiceBoot2DockerISO_title" description="choiceBoot2DockerISO_msg" start_selected="true" start_enabled="true" start_visible="false">
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso"/>
</choice>
<choice id="choiceDockerQuickstartTerminalAPP" title="choiceDockerQuickstartTerminalAPP_title" description="choiceDockerQuickstartTerminalAPP_msg" start_selected="true" start_enabled="true" start_visible="true"> <choice id="choiceDockerQuickstartTerminalAPP" title="choiceDockerQuickstartTerminalAPP_title" description="choiceDockerQuickstartTerminalAPP_msg" start_selected="true" start_enabled="true" start_visible="true">
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"/> <pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"/>
</choice> </choice>
@ -45,10 +42,6 @@
<pkg-ref id="io.docker.pkg.dockercompose"> <pkg-ref id="io.docker.pkg.dockercompose">
<bundle-version/> <bundle-version/>
</pkg-ref> </pkg-ref>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso" auth="Root" version="%BOOT2DOCKER_ISO_VERSION%" installKBytes="%BOOT2DOCKER_ISO_INSTALL_KBYTES%">#boot2dockeriso.pkg</pkg-ref>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso">
<bundle-version/>
</pkg-ref>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp" auth="Root" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%">#dockerquickstartterminalapp.pkg</pkg-ref> <pkg-ref id="io.docker.pkg.dockerquickstartterminalapp" auth="Root" version="%DOCKERQUICKSTARTTERMINALAPP_VERSION%" installKBytes="%DOCKERQUICKSTARTTERMINALAPP_INSTALL_KBYTES%">#dockerquickstartterminalapp.pkg</pkg-ref>
<pkg-ref id="io.docker.pkg.dockerquickstartterminalapp"> <pkg-ref id="io.docker.pkg.dockerquickstartterminalapp">
<bundle-version/> <bundle-version/>
@ -62,9 +55,14 @@
<!-- Manually imported VBox Stuff --> <!-- Manually imported VBox Stuff -->
<installation-check script="checkPrerequisite()"/> <installation-check script="checkPrerequisite()"/>
<script> <script>
<![CDATA[
/* js:pkmk:start */ /* js:pkmk:start */
function checkPrerequisite() function checkPrerequisite()
{ {
try {
system.run('/bin/bash', '-c', 'curl -H "Content-Type: application/json" -X POST https://api.mixpanel.com/track/?data=%EVENT_DATA%');
} catch (e) { system.log(e); }
try try
{ {
test = system.sysctl('hw.machine'); test = system.sysctl('hw.machine');
@ -130,7 +128,8 @@
return false; return false;
} catch (e){ system.log(e); return false; } } catch (e){ system.log(e); return false; }
} }
/* js:pkmk:end */ /* js:pkmk:end */
]]>
</script> </script>
<choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="vboxNeedsUpgrade()" start_enabled="vboxNeedsUpgrade()" start_visible="true"> <choice id="choiceVBox" title="choiceVBox_title" description="choiceVBox_msg" start_selected="vboxNeedsUpgrade()" start_enabled="vboxNeedsUpgrade()" start_visible="true">
<pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="%VBOX_VERSION%" installKBytes="935">#VBoxKEXTs.pkg</pkg-ref> <pkg-ref id="org.virtualbox.pkg.vboxkexts" auth="Root" version="%VBOX_VERSION%" installKBytes="935">#VBoxKEXTs.pkg</pkg-ref>
@ -153,4 +152,11 @@
<pkg-ref id="org.virtualbox.pkg.virtualboxcli"> <pkg-ref id="org.virtualbox.pkg.virtualboxcli">
<bundle-version/> <bundle-version/>
</pkg-ref> </pkg-ref>
<choice id="choiceBoot2DockerISO" title="choiceBoot2DockerISO_title" description="choiceBoot2DockerISO_msg" start_selected="true" start_enabled="true" start_visible="false">
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso"/>
</choice>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso" auth="Root" version="%BOOT2DOCKER_ISO_VERSION%" installKBytes="%BOOT2DOCKER_ISO_INSTALL_KBYTES%">#boot2dockeriso.pkg</pkg-ref>
<pkg-ref id="io.boot2dockeriso.pkg.boot2dockeriso">
<bundle-version/>
</pkg-ref>
</installer-gui-script> </installer-gui-script>

View File

@ -1,5 +1,10 @@
#!/bin/sh #!/bin/bash
# Place boot2docker ISO in cache
mkdir -p ~/.docker/machine/cache mkdir -p ~/.docker/machine/cache
cp /usr/local/share/boot2docker/boot2docker.iso ~/.docker/machine/cache/boot2docker.iso cp /usr/local/share/boot2docker/boot2docker.iso ~/.docker/machine/cache/boot2docker.iso
chown -R $USER:staff ~/.docker chown -R $USER:staff ~/.docker
curl -H "Content-Type: application/json" -X POST "https://api.mixpanel.com/track/?data=%EVENT_DATA%"
# TODO: run migration