Skip to content

Commit

Permalink
Bugfix/702 (#703)
Browse files Browse the repository at this point in the history
* test version fix

* split up files for easier updating

* added git lookups

* fix git sha lookup
  • Loading branch information
matt2005 authored Jan 6, 2025
1 parent a2409a5 commit 299162e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 82 deletions.
43 changes: 2 additions & 41 deletions updater/base_buster_arm7.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,6 @@ apt-get install -y sl
apt-get autoremove -y
"

# update openauto and aasdk
RUN bash -c "
rm -f /usr/local/bin/autoapp
wget -O /usr/local/bin/autoapp https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp
chmod 777 /usr/local/bin/autoapp
rm -f /usr/local/bin/autoapp.md5
wget -O /usr/local/bin/autoapp.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp.md5
chmod 644 /usr/local/bin/autoapp.md5
rm -f /usr/local/bin/autoapp_helper
wget -O /usr/local/bin/autoapp_helper https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper
chmod 777 /usr/local/bin/autoapp_helper
rm -f /usr/local/bin/autoapp_helper.md5
wget -O /usr/local/bin/autoapp_helper.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper.md5
chmod 644 /usr/local/bin/autoapp_helper.md5
rm -f /usr/local/bin/btservice
wget -O /usr/local/bin/btservice https://github.com/opencardev/prebuilts/raw/master/openauto/btservice
chmod 777 /usr/local/bin/btservice
rm -f /usr/local/bin/btservice.md5
wget -O /usr/local/bin/btservice.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/btservice.md5
chmod 644 /usr/local/bin/btservice.md5
rm -f /usr/local/lib/libaasdk.so
wget -O /usr/local/lib/libaasdk.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so
chmod 666 /usr/local/lib/libaasdk.so
rm -f /usr/local/lib/libaasdk.so.md5
wget -O /usr/local/lib/libaasdk.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so.md5
chmod 644 /usr/local/lib/libaasdk.so.md5
rm -f /usr/local/lib/libaasdk_proto.so
wget -O /usr/local/lib/libaasdk_proto.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so
chmod 666 /usr/local/lib/libaasdk_proto.so
rm -f /usr/local/lib/libaasdk_proto.so.md5
wget -O /usr/local/lib/libaasdk_proto.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so.md5
chmod 644 /usr/local/lib/libaasdk_proto.so.md5
rm -f /usr/local/bin/crankshaft
wget -O /usr/local/bin/crankshaft https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft
chmod 777 /usr/local/bin/crankshaft
rm -f /usr/local/bin/crankshaft.md5
wget -O /usr/local/bin/crankshaft.md5 https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft.md5
chmod 644 /usr/local/bin/crankshaft.md5
ldconfig
"

RUN bash -c "
cd /root
rm -rf /usr/local/qt5
Expand All @@ -62,3 +21,5 @@ wget https://github.com/opencardev/prebuilts/raw/master/qt5/Qt_5151_armv7l_OpenG
cat Qt_5151_armv7l_OpenGLES2.tar.xz* > Qt5_OpenGLES2.tar.xz
tar -xf Qt5_OpenGLES2.tar.xz -C /
"

INCLUDE updater/update.Pifile
43 changes: 2 additions & 41 deletions updater/base_buster_armhf.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,6 @@ apt-get install -y sl
apt-get autoremove -y
"

# update openauto and aasdk
RUN bash -c "
rm -f /usr/local/bin/autoapp
wget -O /usr/local/bin/autoapp https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp
chmod 777 /usr/local/bin/autoapp
rm -f /usr/local/bin/autoapp.md5
wget -O /usr/local/bin/autoapp.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp.md5
chmod 644 /usr/local/bin/autoapp.md5
rm -f /usr/local/bin/autoapp_helper
wget -O /usr/local/bin/autoapp_helper https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper
chmod 777 /usr/local/bin/autoapp_helper
rm -f /usr/local/bin/autoapp_helper.md5
wget -O /usr/local/bin/autoapp_helper.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper.md5
chmod 644 /usr/local/bin/autoapp_helper.md5
rm -f /usr/local/bin/btservice
wget -O /usr/local/bin/btservice https://github.com/opencardev/prebuilts/raw/master/openauto/btservice
chmod 777 /usr/local/bin/btservice
rm -f /usr/local/bin/btservice.md5
wget -O /usr/local/bin/btservice.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/btservice.md5
chmod 644 /usr/local/bin/btservice.md5
rm -f /usr/local/lib/libaasdk.so
wget -O /usr/local/lib/libaasdk.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so
chmod 666 /usr/local/lib/libaasdk.so
rm -f /usr/local/lib/libaasdk.so.md5
wget -O /usr/local/lib/libaasdk.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so.md5
chmod 644 /usr/local/lib/libaasdk.so.md5
rm -f /usr/local/lib/libaasdk_proto.so
wget -O /usr/local/lib/libaasdk_proto.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so
chmod 666 /usr/local/lib/libaasdk_proto.so
rm -f /usr/local/lib/libaasdk_proto.so.md5
wget -O /usr/local/lib/libaasdk_proto.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so.md5
chmod 644 /usr/local/lib/libaasdk_proto.so.md5
rm -f /usr/local/bin/crankshaft
wget -O /usr/local/bin/crankshaft https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft
chmod 777 /usr/local/bin/crankshaft
rm -f /usr/local/bin/crankshaft.md5
wget -O /usr/local/bin/crankshaft.md5 https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft.md5
chmod 644 /usr/local/bin/crankshaft.md5
ldconfig
"

RUN bash -c "
cd /root
rm -rf /usr/local/qt5
Expand All @@ -62,3 +21,5 @@ wget https://github.com/opencardev/prebuilts/raw/master/qt5/Qt_5151_OpenGLES2.ta
cat Qt_5151_OpenGLES2.tar.xz* > Qt5_OpenGLES2.tar.xz
tar -xf Qt5_OpenGLES2.tar.xz -C /
"

INCLUDE updater/update.Pifile
59 changes: 59 additions & 0 deletions updater/update.Pifile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# update openauto and aasdk
RUN bash -c "
rm -f /usr/local/bin/autoapp
wget -O /usr/local/bin/autoapp https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp
chmod 777 /usr/local/bin/autoapp
rm -f /usr/local/bin/autoapp.md5
wget -O /usr/local/bin/autoapp.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp.md5
chmod 644 /usr/local/bin/autoapp.md5
rm -f /usr/local/bin/autoapp_helper
wget -O /usr/local/bin/autoapp_helper https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper
chmod 777 /usr/local/bin/autoapp_helper
rm -f /usr/local/bin/autoapp_helper.md5
wget -O /usr/local/bin/autoapp_helper.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/autoapp_helper.md5
chmod 644 /usr/local/bin/autoapp_helper.md5
rm -f /usr/local/bin/btservice
wget -O /usr/local/bin/btservice https://github.com/opencardev/prebuilts/raw/master/openauto/btservice
chmod 777 /usr/local/bin/btservice
rm -f /usr/local/bin/btservice.md5
wget -O /usr/local/bin/btservice.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/btservice.md5
chmod 644 /usr/local/bin/btservice.md5
rm -f /usr/local/lib/libaasdk.so
wget -O /usr/local/lib/libaasdk.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so
chmod 666 /usr/local/lib/libaasdk.so
rm -f /usr/local/lib/libaasdk.so.md5
wget -O /usr/local/lib/libaasdk.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk.so.md5
chmod 644 /usr/local/lib/libaasdk.so.md5
rm -f /usr/local/lib/libaasdk_proto.so
wget -O /usr/local/lib/libaasdk_proto.so https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so
chmod 666 /usr/local/lib/libaasdk_proto.so
rm -f /usr/local/lib/libaasdk_proto.so.md5
wget -O /usr/local/lib/libaasdk_proto.so.md5 https://github.com/opencardev/prebuilts/raw/master/openauto/libaasdk_proto.so.md5
chmod 644 /usr/local/lib/libaasdk_proto.so.md5
rm -f /usr/local/bin/crankshaft
wget -O /usr/local/bin/crankshaft https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft
chmod 777 /usr/local/bin/crankshaft
rm -f /usr/local/bin/crankshaft.md5
wget -O /usr/local/bin/crankshaft.md5 https://github.com/opencardev/prebuilts/raw/master/csmt/crankshaft.md5
chmod 644 /usr/local/bin/crankshaft.md5
ldconfig
"

HOST bash -c "
cat > crankshaft.date << EOF
$(date '+%Y-%m-%d')
EOF

cat > crankshaft.build << EOF
$(git rev-parse --short)
EOF

cat > crankshaft.branch << EOF
$(git rev-parse --abbrev-ref HEAD)
EOF
"

# update version
INSTALL "crankshaft.date" "/etc/crankshaft.date"
INSTALL "crankshaft.build" "/etc/crankshaft.build"
INSTALL "crankshaft.branch" "/etc/crankshaft.branch"

0 comments on commit 299162e

Please sign in to comment.