Skip to content

Commit

Permalink
Rename Ecore2Emfatic binary/artifact ID to ecore2Emfatic
Browse files Browse the repository at this point in the history
It seems Github Packages may reject artifacts whose ID starts with a
capital letter. Trying to fix this now.
  • Loading branch information
agarciadom committed May 22, 2024
1 parent 2b33da8 commit dc23bd0
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: Ecore2Emfatic-${{ matrix.os }}
path: build/native/nativeCompile/Ecore2Emfatic*
name: ecore2Emfatic-${{ matrix.os }}
path: build/native/nativeCompile/ecore2Emfatic*
2 changes: 1 addition & 1 deletion .github/workflows/release-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload $GITHUB_REF_NAME build/native/nativeCompile/Ecore2Emfatic*
run: gh release upload $GITHUB_REF_NAME build/native/nativeCompile/ecore2Emfatic*
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ It is recommended to use [SDKMAN](https://sdkman.io/) for installing and managin
To produce Emfatic sources from an `.ecore` file, using the all-in-one JAR file in `build/libs/*-all.jar`:

```sh
java -jar path/to/Ecore2Emfatic-VERSION-all.jar path/to/your.ecore
java -jar path/to/ecore2Emfatic-VERSION-all.jar path/to/your.ecore
```

When using one of the native binaries, this can be simplified to:

```sh
path/to/Ecore2Emfatic path/to/your.ecore
path/to/ecore2Emfatic path/to/your.ecore
```

## Using native binaries as a Git filter
Expand All @@ -34,13 +34,13 @@ In order to compute differences between `.ecore` file versions using a Git `text
In Linux/Mac:

```sh
cp build/native/nativeCompile/Ecore2Emfatic /folder/in/PATH
cp build/native/nativeCompile/ecore2Emfatic /folder/in/PATH
```

You will then need to define the `ecore` differencing algorithm:

```sh
git config --global diff.ecore.textconv Ecore2Emfatic
git config --global diff.ecore.textconv ecore2Emfatic
```

You can then use this conversion from any Git repository, by adding a `.gitattributes` file to its root folder with this content:
Expand Down Expand Up @@ -71,18 +71,18 @@ index 84da8c9..f611dd1 100644
If your `.ecore` files import other metamodels through URIs, you can provide mappings from URIs to specific `.ecore` files or folders via the `--from` and `--to` options:

```sh
path/to/Ecore2Emfatic --from platform:/resource --to path/to/base/folder your.ecore
path/to/ecore2Emfatic --from platform:/resource --to path/to/base/folder your.ecore
```

You can specify multiple pairs of `--from` and `--to` options, as in:

```sh
path/to/Ecore2Emfatic --from A --to B --from C --to D your.ecore
path/to/ecore2Emfatic --from A --to B --from C --to D your.ecore
```

If you are using this tool as a `textconv` filter via Git, you would need to provide these options in your repository's configuration.
For example:

```sh
git config diff.ecore.textconv "Ecore2Emfatic --from A --to B"
git config diff.ecore.textconv "ecore2Emfatic --from A --to B"
```
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
}

application {
mainClass.set("org.eclipse.emfatic.cli.Ecore2EmfaticCommand")
mainClass.set("org.eclipse.emfatic.cli.ecore2EmfaticCommand")
}
java {
sourceCompatibility = JavaVersion.toVersion("17")
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

rootProject.name="Ecore2Emfatic"
rootProject.name="ecore2Emfatic"

Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
EStringToStringMapEntryImpl[].class,
ETypeParameter[].class
})
@Command(name = "Ecore2Emfatic", description = "Generates Emfatic sources from an .ecore file", mixinStandardHelpOptions = true)
public class Ecore2EmfaticCommand implements Runnable {
@Command(name = "ecore2Emfatic", description = "Generates Emfatic sources from an .ecore file", mixinStandardHelpOptions = true)
public class ecore2EmfaticCommand implements Runnable {

static class URIMapping {
@Option(names = { "-f", "--from" })
Expand All @@ -57,7 +57,7 @@ static class URIMapping {
private String pathToFile;

public static void main(String[] args) throws Exception {
PicocliRunner.run(Ecore2EmfaticCommand.class, args);
PicocliRunner.run(ecore2EmfaticCommand.class, args);
}

public void run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.io.PrintStream;
import org.junit.jupiter.api.Test;

public class Ecore2EmfaticCommandTest {
public class ecore2EmfaticCommandTest {

@Test
public void testStandaloneMetamodel() throws Exception {
Expand All @@ -27,7 +27,7 @@ public void testStandaloneMetamodel() throws Exception {

try (ApplicationContext ctx = ApplicationContext.run(Environment.CLI, Environment.TEST)) {
String[] args = new String[] { "src/test/resources/OO.ecore" };
PicocliRunner.run(Ecore2EmfaticCommand.class, ctx, args);
PicocliRunner.run(ecore2EmfaticCommand.class, ctx, args);
assertContains("Should see a PackageableElement in the output", baos.toString(), "PackageableElement");
}
}
Expand All @@ -49,7 +49,7 @@ public void testMetamodelWithPlatformImport() throws Exception {
"--to=src/test/resources/platformImport",
"src/test/resources/platformImport/example2/ColoredTree.ecore"
};
PicocliRunner.run(Ecore2EmfaticCommand.class, ctx, args);
PicocliRunner.run(ecore2EmfaticCommand.class, ctx, args);
assertContains("Should see 'extends Trees.Tree' in the output",
baos.toString(), "extends Trees.Tree");
}
Expand Down

0 comments on commit dc23bd0

Please sign in to comment.