Skip to content

Commit

Permalink
display GIT commit id in kickstart (can't be trusted if in a kickup
Browse files Browse the repository at this point in the history
ROM -- which we should probably detect).
  • Loading branch information
gardners committed Apr 19, 2015
1 parent fa9eb48 commit b6f7b36
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -34,7 +34,10 @@ f011test.prg: f011test.a65 Makefile
diskchooser: diskchooser.a65 etherload.prg Makefile
../Ophis/bin/ophis -4 diskchooser.a65 -l diskchooser.list

kickstart65gs.bin: $(KICKSTARTSRCS) Makefile diskchooser
version.a65: *.vhdl *.a65 *.vhd Makefile
./version.sh

kickstart65gs.bin: $(KICKSTARTSRCS) Makefile diskchooser version.a65
../Ophis/bin/ophis -4 kickstart.a65 -l kickstart.list

thumbnail.prg: showthumbnail.a65 Makefile
Expand Down
10 changes: 6 additions & 4 deletions kickstart.a65
Expand Up @@ -344,6 +344,11 @@ reset_entry_common:
ldy #>msg_blankline
jsr printmessage

; Display GIT commit
ldx #<msg_gitcommit
ldy #<msg_gitcommit
jsr printmessage

; check keyboard for 0-9 down to select alternate rom
jsr keyboardread

Expand Down Expand Up @@ -1972,10 +1977,6 @@ default_rom:
lda #'M
sta txt_c65gsrom,x

ldx #<txt_c65gsrom
ldy #>txt_c65gsrom
jsr printmessage

rts

;-----------------------------------------------------------------------------
Expand Down Expand Up @@ -2316,6 +2317,7 @@ msg_lookingfornextsector:
.byte "LOOKING FOR NEXT SECTOR OF FILE",0
msg_nologo: .byte "COULD NOT LOAD BOOTLOGO.G65 (ERRNO:$$)",0
msg_cdrootfailed: .byte "COULD NOT CHDIR TO / (ERRNO:$$)",0
.include "version.a65"

msg_blankline: .byte 0

Expand Down
2 changes: 1 addition & 1 deletion kickstart.vhdl

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions mkversiona65.sh
@@ -0,0 +1,3 @@
`which echo` -n 'msg_version: .byte "GIT COMMIT: ' >version.a65
`which echo` -n `git log | head -1 | cut -f2 -d" " | cut -c1-7,41-` >>version.a65
echo '",0' >>version.a65
4 changes: 4 additions & 0 deletions version.sh
@@ -1,3 +1,7 @@
version=`git log | head | grep commit | head -1 | cut -f2 -d" "``[[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && echo "+DIRTY"`
echo $version
cat version-template.vhdl | sed -e 's/GITCOMMIT/'${version}'/g' > version.vhdl

version=`git log | head | grep commit | head -1 | cut -f2 -d" " | tr "abcdef" "ABCDEF" | cut -c1-15`\*`[[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && echo "+DIRTY"`
echo $version
echo 'msg_gitcommit: .byte "GIT COMMIT: '${version}'",0' > version.a65

0 comments on commit b6f7b36

Please sign in to comment.