Skip to content

Commit

Permalink
Added version
Browse files Browse the repository at this point in the history
  • Loading branch information
JUAN CASTAÑEDA committed Sep 1, 2023
1 parent 038a729 commit fee5872
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ target_data_directory := lib/src/main/resources/
target_po_directory := lib/src/main/resources/iso_3166/
target_po_639_directory := lib/src/main/resources/iso_639/

ARTIFACT_VERSION=$(shell git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 2-7)

.PHONY: clone-iso-codes
clone-iso-codes:
git clone https://github.com/sailfishos-mirror/iso-codes.git
Expand All @@ -28,3 +30,9 @@ delete-po-and-mo:

.PHONY: get-latest-iso-files
get-latest-iso-files: clone-iso-codes transpile-translations delete-po-and-mo

.PHONY: publish
publish:
@echo "[make]Publishing version $(ARTIFACT_VERSION)"
ARTIFACT_VERSION=$(ARTIFACT_VERSION) ./gradlew testVersion
ARTIFACT_VERSION=$(ARTIFACT_VERSION) ./gradlew publish
6 changes: 5 additions & 1 deletion lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* This project uses @Incubating APIs which are subject to change.
*/
group = "com.jimdo"

version = System.getenv("ARTIFACT_VERSION") + ".0.0"
plugins {
// Apply the java-library plugin for API and implementation separation.
`java-library`
Expand All @@ -32,6 +32,10 @@ tasks.withType<Test> {
}
}

tasks.register("testVersion") {
println("The package version is: " + version)
}

//////////////////////////////////////////
// Publish and signature configuration. //
//////////////////////////////////////////
Expand Down
2 changes: 0 additions & 2 deletions lib/src/test/java/com/jimdo/jcountry/JCountryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void testJCountryReadsTranslations() {

languages.forEach( it -> {
Optional<ResourceBundle> bundle = countryDB.getCountriesTranslations(new Locale(it));
System.out.println(it);
assertTrue(!bundle.isEmpty());
});
}
Expand Down Expand Up @@ -115,7 +114,6 @@ void testJCountryLanguagesReadsTranslations() {

languages.forEach( it -> {
Optional<ResourceBundle> bundle = languageDB.getLanguagesTranslations(new Locale(it));
System.out.println(it);
assertTrue(!bundle.isEmpty(), it + " translation");
});
}
Expand Down

0 comments on commit fee5872

Please sign in to comment.