@@ -78,8 +78,8 @@ Vagrant.configure(2) do |config|
echo -e "#!/bin/sh\nbuild-exa && test-exa && run-xtests" > /usr/bin/compile-exa
ln -sf /usr/bin/compile-exa /usr/bin/c
- echo -e "#!/bin/sh\nbash /vagrant/devtools/dev-package-for-linux.sh" > /usr/bin/package-exa
- echo -e "#!/bin/sh\ncat /etc/motd" > /usr/bin/halp
+ echo -e "#!/bin/sh\nbash /vagrant/devtools/dev-package-for-linux.sh \\$@" > /usr/bin/package-exa
+ echo -e "#!/bin/sh\ncat /etc/motd" > /usr/bin/halp
chmod +x /usr/bin/{exa,rexa,b,t,x,c,build-exa,test-exa,run-xtests,compile-exa,package-exa,halp}
EOF
@@ -29,7 +29,9 @@ fn main() {
}
fn is_development_version() -> bool {
- env::var("PROFILE").unwrap() == "debug"
+ // Both weekly releases and actual releases are --release releases,
+ // but actual releases will have a proper version number
+ cargo_version().ends_with("-pre") || env::var("PROFILE").unwrap() == "debug"
fn cargo_version() -> String {
@@ -25,6 +25,13 @@ eval exa_$(grep version $toml_file | head -n 1 | sed "s/ //g")
if [ -z "$exa_version" ]; then
echo "Failed to parse version number! Can't build exa!"
exit 1
+fi
+
+# Weekly builds have a bit more information in their version number (see build.rs).
+if [[ "$1" == "--weekly" ]]; then
+ git_hash=`GIT_DIR=/vagrant/.git git rev-parse --short --verify HEAD`
+ date=`date +"%Y-%m-%d"`
+ echo "Building exa weekly v$exa_version, date $date, Git hash $git_hash"
else
echo "Building exa v$exa_version"
fi
@@ -50,7 +57,10 @@ strip -v "$exa_linux_binary"
# the binaries can have consistent names, and it’s still possible to tell
# different *downloads* apart.
echo -e "\n\033[4mZipping binary...\033[0m"
-exa_linux_zip="/vagrant/exa-linux-x86_64-${exa_version}.zip"
+if [[ "$1" == "--weekly" ]]
+ then exa_linux_zip="/vagrant/exa-linux-x86_64-${exa_version}-${date}-${git_hash}.zip"
+ else exa_linux_zip="/vagrant/exa-linux-x86_64-${exa_version}.zip"
rm -vf "$exa_linux_zip"
zip -j "$exa_linux_zip" "$exa_linux_binary"