chore(ci): Dependabot, workflow security (#1257)
Co-authored-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: niStee <52573120+niStee@users.noreply.github.comclear> Co-authored-by: GideonBear <87426140+GideonBear@users.noreply.github.com>
This commit is contained in:
35
build-all.sh
35
build-all.sh
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
build_function() {
|
||||
rustup update
|
||||
cargo install cross
|
||||
@@ -20,7 +21,7 @@ build_function() {
|
||||
|
||||
package_function() {
|
||||
|
||||
cd build
|
||||
cd build || exit 1
|
||||
mkdir x86_64-unknown-linux-gnu/
|
||||
mkdir x86_64-unknown-linux-musl/
|
||||
mkdir x86_64-unknown-freebsd/
|
||||
@@ -35,28 +36,28 @@ package_function() {
|
||||
cp ../target/aarch64-unknown-linux-musl/release/topgrade aarch64-unknown-linux-musl/topgrade
|
||||
cp ../target/x86_64-pc-windows-gnu/release/topgrade.exe x86_64-pc-windows-gnu/topgrade.exe
|
||||
|
||||
cd x86_64-unknown-linux-gnu/
|
||||
tar -czf ../topgrade-${ans}-x86_64-linux-gnu.tar.gz topgrade
|
||||
cd x86_64-unknown-linux-gnu/ || exit 1
|
||||
tar -czf "../topgrade-${ans}-x86_64-linux-gnu.tar.gz" topgrade
|
||||
cd ..
|
||||
|
||||
cd x86_64-unknown-linux-musl
|
||||
tar -czf ../topgrade-${ans}-x86_64-linux-musl.tar.gz topgrade
|
||||
cd x86_64-unknown-linux-musl/ || exit 1
|
||||
tar -czf "../topgrade-${ans}-x86_64-linux-musl.tar.gz" topgrade
|
||||
cd ..
|
||||
|
||||
cd x86_64-unknown-freebsd/
|
||||
tar -czf ../topgrade-${ans}-x86_64-freebsd.tar.gz topgrade
|
||||
cd x86_64-unknown-freebsd/ || exit 1
|
||||
tar -czf "../topgrade-${ans}-x86_64-freebsd.tar.gz" topgrade
|
||||
cd ..
|
||||
|
||||
cd aarch64-unknown-linux-gnu/
|
||||
tar -czf ../topgrade-${ans}-aarch64-linux-gnu.tar.gz topgrade
|
||||
cd aarch64-unknown-linux-gnu/ || exit 1
|
||||
tar -czf "../topgrade-${ans}-aarch64-linux-gnu.tar.gz" topgrade
|
||||
cd ..
|
||||
|
||||
cd aarch64-unknown-linux-musl/
|
||||
tar -czf ../topgrade-${ans}-aarch64-linux-musl.tar.gz topgrade
|
||||
cd aarch64-unknown-linux-musl/ || exit 1
|
||||
tar -czf "../topgrade-${ans}-aarch64-linux-musl.tar.gz" topgrade
|
||||
cd ..
|
||||
|
||||
cd x86_64-pc-windows-gnu/
|
||||
zip -q ../topgrade-${ans}-x86_64-windows.zip topgrade.exe
|
||||
cd x86_64-pc-windows-gnu/ || exit 1
|
||||
zip -q "../topgrade-${ans}-x86_64-windows.zip" topgrade.exe
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
@@ -65,17 +66,19 @@ package_function() {
|
||||
print_checksums() {
|
||||
|
||||
|
||||
cd build/
|
||||
sha256sum topgrade-${ans}-*
|
||||
cd build/ || exit 1
|
||||
sha256sum topgrade-"${ans}"-*
|
||||
cd ../
|
||||
}
|
||||
|
||||
while true; do
|
||||
|
||||
echo "You should always have a look on scripts you download from the internet."
|
||||
# shellcheck disable=SC2162
|
||||
read -p "Do you still want to proceed? (y/n) " yn
|
||||
|
||||
echo -n "Input version number: "
|
||||
# shellcheck disable=SC2162
|
||||
read ans
|
||||
mkdir build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user