mirror of https://github.com/xemu-project/xemu.git
archive-source.sh: Save submodule version
This commit is contained in:
parent
c41abd211b
commit
2601968a55
|
@ -66,16 +66,17 @@ for sm in $submodules; do
|
||||||
echo "WARNING: submodule $sm is out of sync"
|
echo "WARNING: submodule $sm is out of sync"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
(cd "$sm"; git rev-parse HEAD 2>/dev/null >HEAD)
|
||||||
(cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file"
|
(cd $sm; git archive --format tar --prefix "$sm/" $(tree_ish)) > "$sub_file"
|
||||||
test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
|
test $? -ne 0 && error "failed to archive submodule $sm ($smhash)"
|
||||||
tar --concatenate --file "$tar_file" "$sub_file"
|
tar --concatenate --file "$tar_file" "$sub_file"
|
||||||
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
|
test $? -ne 0 && error "failed append submodule $sm to $tar_file"
|
||||||
|
tar --append --file "$tar_file" "$sm"/HEAD
|
||||||
done
|
done
|
||||||
|
|
||||||
python3 ./scripts/gen-license.py > XEMU_LICENSE
|
|
||||||
git rev-parse HEAD 2>/dev/null | tr -d '\n' > XEMU_COMMIT
|
git rev-parse HEAD 2>/dev/null | tr -d '\n' > XEMU_COMMIT
|
||||||
git symbolic-ref --short HEAD > XEMU_BRANCH
|
git symbolic-ref --short HEAD > XEMU_BRANCH
|
||||||
git describe --match 'xemu-v*' | cut -c 7- | tr -d '\n' > XEMU_VERSION
|
git describe --tags --match 'xemu-v*' | cut -c 7- | tr -d '\n' > XEMU_VERSION
|
||||||
tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION XEMU_LICENSE
|
tar -r --file "$tar_file" XEMU_COMMIT XEMU_BRANCH XEMU_VERSION
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue