Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
marlin-anet-a8
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
marlin-anet-a8
Commits
aa7a65e6
Unverified
Commit
aa7a65e6
authored
8 years ago
by
João Brázio
Browse files
Options
Downloads
Patches
Plain Diff
Updated travis config
parent
7de01612
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LinuxAddons/bin/generate_version_header_for_marlin
+21
-19
21 additions, 19 deletions
LinuxAddons/bin/generate_version_header_for_marlin
with
21 additions
and
19 deletions
LinuxAddons/bin/generate_version_header_for_marlin
+
21
−
19
View file @
aa7a65e6
...
...
@@ -3,24 +3,29 @@
DIR
=
"
$1
"
export
DIR
OUTFILE
=
"
$2
"
export
OUTFILE
echo
"/* This file is automatically generated by an Arduino hook"
>
"
$OUTFILE
"
echo
" * Do not manually edit it"
>>
"
$OUTFILE
"
echo
" * It does not get committed to the repository"
>>
"
$OUTFILE
"
echo
" */"
>>
"
$OUTFILE
"
echo
""
>>
"
$OUTFILE
"
echo
"#define PROTOCOL_VERSION
\"
1.0
\"
"
>>
"
$OUTFILE
"
echo
"#define DEFAULT_SOURCE_URL
\"
https://github.com/MarlinFirmware/Marlin
\"
"
>>
"
$OUTFILE
"
echo
"#define DEFAULT_MACHINE_NAME
\"
Travis 3D Printer
\"
"
>>
"
$OUTFILE
"
echo
"#define DEFAULT_MACHINE_UUID
\"
3442baa1-08ee-435b-8a10-99d185bd43b8
\"
"
>>
"
$OUTFILE
"
echo
""
>>
"
$OUTFILE
"
echo
"#define BUILD_UNIX_DATETIME"
`
date
+%s
`
>>
"
$OUTFILE
"
echo
"#define STRING_DISTRIBUTION_DATE"
`
date
'+"%Y-%m-%d %H:%M"'
`
>>
"
$OUTFILE
"
echo
""
>>
"
$OUTFILE
"
BUILDATE
=
$(
date
'+"%s"'
)
DISTDATE
=
$(
date
'+"%Y-%m-%d %H:%M"'
)
cat
>
"
$OUTFILE
"
<<
EOF
/**
* THIS FILE IS AUTOMATICALLY GENERATED DO NOT MANUALLY EDIT IT.
* IT DOES NOT GET COMMITTED TO THE REPOSITORY.
*/
#define BUILD_UNIX_DATETIME
${
BUILDATE
}
#define STRING_DISTRIBUTION_DATE
${
DISTDATE
}
#define PROTOCOL_VERSION "1.0"
#define MACHINE_NAME "Travis CI"
#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
#define DEFAULT_MACHINE_UUID "3442baa1-08ee-435b-8a10-99d185bd43b8"
#define WEBSITE_URL "http://marlinfw.org"
EOF
(
set
+e
cd
"
$DIR
"
BRANCH
=
`
git symbolic-ref
-q
--short
HEAD
`
if
[
"x
$BRANCH
"
==
"x"
]
;
then
BRANCH
=
""
...
...
@@ -29,6 +34,7 @@ echo "" >>"$OUTFILE"
else
BRANCH
=
"
$BRANCH
"
fi
VERSION
=
`
git describe
--tags
--first-parent
2>/dev/null
`
if
[
"x
$VERSION
"
!=
"x"
]
;
then
echo
"#define SHORT_BUILD_VERSION
\"
$VERSION
\"
"
|
sed
"s/-.*/
$BRANCH
\"
/"
>>
"
$OUTFILE
"
...
...
@@ -38,8 +44,4 @@ echo "" >>"$OUTFILE"
echo
"#define SHORT_BUILD_VERSION
\"
$BRANCH
\"
"
>>
"
$OUTFILE
"
echo
"#define DETAILED_BUILD_VERSION
\"
${
BRANCH
}
-
$VERSION
\"
"
>>
"
$OUTFILE
"
fi
URL
=
`
git config
--local
--get
remote.origin.url |
sed
"sx.*github.com.xhttps://github.com/x"
|
sed
"sx
\.
gitx/x"
`
if
[
"x
$URL
"
!=
"x"
]
;
then
echo
"#define SOURCE_CODE_URL
\"
"
$URL
"
\"
"
>>
"
$OUTFILE
"
fi
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment