Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Feature: Fix assembly version (#19)
Browse files Browse the repository at this point in the history
* Changed to use only major in assembly version

* Changed changelog

* Updated to 12.0.102

* Shortened CHANGELOG.md
  • Loading branch information
applejag committed Dec 1, 2019
1 parent 343086e commit 251865e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
env VERSION "$($SCRIPTS/get_json_version.sh ./ci/version.json FULL)"
env VERSION_SUFFIX "$($SCRIPTS/get_json_version.sh ./ci/version.json SUFFIX)"
env VERSION_JSON_NET "$($SCRIPTS/get_json_version.sh ./ci/version.json JSON_NET)"
env VERSION_ASSEMBLY "$($SCRIPTS/get_json_version.sh ./ci/version.json ASSEMBLY)"
echo
echo ">>> UPDATING VERSION IN $(pwd)/Src/Newtonsoft.Json-for-Unity/package.json"
Expand Down
15 changes: 4 additions & 11 deletions Src/Newtonsoft.Json-for-Unity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# Newtonsoft.Json for Unity changelog

## 12.0.101
## 12.0.102

- Fixed to use only major version in assembly version (ex: `12.0.0.0`, instead of `12.0.1.0`)

## Changes
## 12.0.101

- Setup CircleCI integration
- Setup Codacy integration
- Switched to [cloudsmith.com][cloudsmith-url] as registry provider
- New versioning format. For more info see [the readme in the repository][readme-url]. Changes are based of off `12.0.1-patch-001` version _(in previous format)._

## 12.0.1-patch-001

- Fixed building on standalone ([Issue #3][issue3])

## 12.0.1

- Initial release
- Deployed to [npmjs.com][npm-url]

[readme-url]: https://github.com/jilleJr/Newtonsoft.Json-for-Unity#readme
[cloudsmith-url]: https://cloudsmith.io/~jillejr/repos/newtonsoft-json-for-unity
[npm-url]: https://www.npmjs.com/package/jillejr.newtonsoft.json-for-unity
[issue3]: https://github.com/jilleJr/Newtonsoft.Json-for-Unity/issues/3
1 change: 1 addition & 0 deletions ci/local_build_into_package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ try {
env VERSION "$($SCRIPTS/get_json_version.sh ./ci/version.json FULL)"
env VERSION_SUFFIX "$($SCRIPTS/get_json_version.sh ./ci/version.json SUFFIX)"
env VERSION_JSON_NET "$($SCRIPTS/get_json_version.sh ./ci/version.json JSON_NET)"
env VERSION_ASSEMBLY "$($SCRIPTS/get_json_version.sh ./ci/version.json ASSEMBLY)"
echo
echo ">>> UPDATING VERSION IN $(pwd)/Src/Newtonsoft.Json-for-Unity/package.json"
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ BUILD_DESTINATION=${3:-${BUILD_DESTINATION:-"${BUILD_DESTINATION_BASE:?"Build ou

: ${VERSION:?"Full version required."}
: ${VERSION_JSON_NET:?"Json.NET version required."}
: ${VERSION_ASSEMBLY:?"Assembly version required."}
: ${VERSION_SUFFIX:?"Version suffix required."}
: ${BUILD_CONFIGURATION:="Release"}

Expand Down Expand Up @@ -40,7 +41,7 @@ msbuild -t:build "$BUILD_SOLUTION" \
-p:UnityBuild="$BUILD_UNITY" \
-p:VersionPrefix="$VERSION_JSON_NET" \
-p:VersionSuffix="$VERSION_SUFFIX" \
-p:AssemblyVersion="$VERSION_JSON_NET" \
-p:AssemblyVersion="$VERSION_ASSEMBLY" \
-p:FileVersion="$VERSION"

echo
Expand Down
5 changes: 4 additions & 1 deletion ci/scripts/get_json_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ FULL)
JSON_NET)
jq2 -er '(.Major // 0|tostring) + "." + (.Minor // 0|tostring) + "." + (.Patch // 0|tostring)' "$jsonFile"
;;
ASSEMBLY)
jq2 -er '(.Major // 0|tostring) + ".0.0.0"' "$jsonFile"
;;
SUFFIX)
release="$(jq2 -er '.Release // empty' "$jsonFile")"

Expand All @@ -61,7 +64,7 @@ RELEASE)
;;
*)
error "Error: Unknown output type '$output'
Possible values: FULL, JSON_NET, SUFFIX, RELEASE"
Possible values: FULL, JSON_NET, ASSEMBLY, SUFFIX, RELEASE"
exit 3
;;
esac
2 changes: 1 addition & 1 deletion ci/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"Minor": 0,
"Patch": 2,

"Release": 1
"Release": 2
}

0 comments on commit 251865e

Please sign in to comment.