@@ -83,10 +83,10 @@ install_brioche() {
8383 brioche_url=" https://releases.brioche.dev/$LATEST_BRIOCHE_VERSION /x86_64-linux/brioche"
8484 ;;
8585 " x86_64 nightly" )
86- brioche_url=" https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/x86_64-linux/brioche "
86+ brioche_url=" https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/brioche- x86_64-linux.tar.xz "
8787 ;;
8888 " aarch64 nightly" )
89- brioche_url=" https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/aarch64-linux/brioche "
89+ brioche_url=" https://development-content.brioche.dev/github.com/brioche-dev/brioche/branches/main/brioche- aarch64-linux.tar.xz "
9090 ;;
9191 * )
9292 echo " ::error::Sorry, Brioche isn't currently supported on your architecture"
@@ -143,10 +143,29 @@ install_brioche() {
143143 echo " ::endgroup::"
144144
145145 echo " ::group::Installing Brioche"
146- mkdir -p " $install_dir "
147- chmod +x " $brioche_temp /brioche"
148- mv " $brioche_temp /brioche" " $install_dir /brioche"
149- echo " Installation complete! Brioche installed to $install_dir /brioche"
146+
147+ if [ " $version " = " nightly" ]; then\
148+ unpack_dir=" $HOME /.local/libexec/brioche"
149+
150+ rm -rf " $unpack_dir /nightly"
151+ mkdir -p " $unpack_dir /nightly"
152+ tar -xJf " $brioche_temp /brioche" --strip-components=1 -C " $unpack_dir /nightly"
153+
154+ ln -sf nightly " $unpack_dir /current"
155+
156+ symlink_target=" $unpack_dir /current/bin/brioche"
157+ mkdir -p " $install_dir "
158+ ln -sfr " $symlink_target " " $install_dir /brioche"
159+
160+ echo " Installation complete! Brioche installed to $install_dir /brioche (symlink to $unpack_dir /current/bin/brioche)"
161+ else
162+ mkdir -p " $install_dir "
163+ chmod +x " $brioche_temp /brioche"
164+ mv " $brioche_temp /brioche" " $install_dir /brioche"
165+
166+ echo " Installation complete! Brioche installed to $install_dir /brioche"
167+ fi
168+
150169 echo " ::endgroup::"
151170
152171 echo ' ::group::Updating $PATH'
@@ -164,7 +183,8 @@ install_brioche() {
164183 if [ -n " $should_install_apparmor " ]; then
165184 echo " ::group::Installing AppArmor config"
166185
167- export BRIOCHE_INSTALL_PATH=" $install_dir /brioche"
186+ BRIOCHE_INSTALL_PATH=" $( realpath " $install_dir /brioche" ) "
187+ export BRIOCHE_INSTALL_PATH
168188 cat " $GITHUB_ACTION_PATH /apparmor.d/brioche-gh-actions.tpl" | envsubst | sudo tee /etc/apparmor.d/brioche-gh-actions
169189 sudo apparmor_parser -r /etc/apparmor.d/brioche-gh-actions
170190
0 commit comments