-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move frame work constant value to a single file (#76)
- Loading branch information
1 parent
eeb927b
commit a0e5958
Showing
5 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Do not edit this file. | ||
|
||
// Package metadata provides framework info registered to registry. | ||
package metadata | ||
|
||
// constant for sdk version, name, registration component | ||
const ( | ||
SdkVersion = "0.1" | ||
SdkName = "Go-Chassis" | ||
SdkRegistrationComponent = "SDK" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
CURRENT_DIR=$(cd $(dirname $0);pwd) | ||
CHASSIS_DIR=$(dirname $CURRENT_DIR) | ||
|
||
FRAMEWORK_FILE="$CHASSIS_DIR/core/metadata/framework.go" | ||
|
||
if [ ! -f "$FRAMEWORK_FILE" ]; then | ||
echo "$FRAMEWORK_FILE not exist!" | ||
exit 1 | ||
fi | ||
|
||
version=${1:-"0.1"} | ||
cat << EOF > $FRAMEWORK_FILE | ||
// Do not edit this file. | ||
// Package metadata provides framework info registered to registry. | ||
package metadata | ||
// constant for sdk version, name, registration component | ||
const ( | ||
SdkVersion = "$version" | ||
SdkName = "Go-Chassis" | ||
SdkRegistrationComponent = "SDK" | ||
) | ||
EOF |