forked from byzer-org/byzer-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8be105d
commit 2753768
Showing
2 changed files
with
38 additions
and
1 deletion.
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,36 @@ | ||
newlines = [] | ||
|
||
meet = False | ||
meet1 = False | ||
|
||
with open("pom.xml", "r") as reader: | ||
line = reader.readline() | ||
while line: | ||
|
||
if "<!-- spark 2.4 end -->" in line: | ||
meet = False | ||
|
||
if meet: | ||
newlines.append("<!-- " + line.rstrip("\n") + " -->" + "\n") | ||
|
||
if "<!-- spark 2.4 start -->" in line: | ||
newlines.append(line) | ||
meet = True | ||
|
||
if "<!-- spark 3.0 end -->" in line: | ||
meet1 = False | ||
|
||
if meet1: | ||
newlines.append(line.lstrip().lstrip("<!--").rstrip().rstrip("\n").rstrip("-->") + "\n") | ||
|
||
if "<!-- spark 3.0 start -->" in line: | ||
newlines.append(line) | ||
meet1 = True | ||
|
||
if not meet and not meet1: | ||
newlines.append(line) | ||
|
||
line = reader.readline() | ||
|
||
with open("pom.xml","w") as writer: | ||
writer.writelines(newlines) |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
git co . | ||
git pull origin TRY | ||
./dev/change-scala-version.sh 2.12 | ||
./dev/change-scala-version.sh 2.12 | ||
python ./dev/python/convert_pom.py |