4 Commits

Author SHA1 Message Date
Twarit Waikar
6c53f46d8f Merge pull request #107 from ChronicallySerious/remove-get-commit-date 2022-04-09 20:36:23 +05:30
ChronicallySerious
616c26c2c9 Remove get_commit_date() and replace with Godot's new Time singleton 2022-02-24 04:08:54 +05:30
Twarit Waikar
2e3afd8379 Fix minor typo in README.md#bleeding-edge 2022-01-16 01:35:50 +05:30
ChronicallySerious
18e18fe3f8 Add release.sh script for creating new releases 2022-01-16 01:01:55 +05:30
5 changed files with 6387 additions and 349 deletions

View File

@@ -46,7 +46,7 @@ To build using custom GDNative API definition JSON files, run the below helper c
scons platform=<platform> target=debug godot_cpp=yes generate_bindings=yes bits=64 use_custom_api_file=yes custom_api_file=path/to/api.json -j 6
```
Once this command can completed successfully, the standard build commands in the above section can be run without recompiling godot-cpp. To stop godot-cpp from recompiling, do not use the `godot_cpp` option in SCons arguments. To view more options available while recompiling godot-cpp, run `scons platform=<platform> godot_cpp=yes -h`.
Once this command is completed successfully, the standard build commands in the above section can be run without recompiling godot-cpp. Once compiled, to stop godot-cpp from recompiling, do not use the `godot_cpp` option in SCons arguments. To view more options available while recompiling godot-cpp, run `scons platform=<platform> godot_cpp=yes -h`.
---

File diff suppressed because it is too large Load Diff

View File

@@ -233,31 +233,6 @@ void GitAPI::create_gitignore_and_gitattributes() {
file->free();
}
String GitAPI::get_commit_date(const git_time *intime) {
char sign, out[32];
struct tm *intm;
int offset, hours, minutes;
time_t t;
offset = intime->offset;
if (offset < 0) {
sign = '-';
offset = -offset;
} else {
sign = '+';
}
hours = offset / 60;
minutes = offset % 60;
t = (time_t)intime->time + (intime->offset * 60);
intm = gmtime(&t);
strftime(out, sizeof(out), "%a %b %e %T %Y", intm);
return String(out) + " " + sign + (hours < 10 ? "0" : "") + String::num(hours) + ":" + (minutes < 10 ? "0" : "") + String::num(minutes);
}
Array GitAPI::_get_modified_files_data() {
Array stats_files;
@@ -442,7 +417,7 @@ Array GitAPI::_get_previous_commits(const int64_t max_commits) {
const git_signature *sig = git_commit_author(commit.get());
String author = String() + sig->name + " <" + sig->email + ">";
commits.push_back(create_commit(msg, author, commit_id, get_commit_date(&sig->when)));
commits.push_back(create_commit(msg, author, commit_id, sig->when.time, sig->when.offset));
}
return commits;

View File

@@ -143,7 +143,6 @@ public:
bool check_errors(int error, String function, String file, int line, String message, const std::vector<git_error_code> &ignores = {});
void create_gitignore_and_gitattributes();
bool create_initial_commit();
String get_commit_date(const git_time *intime);
void _init();
};

54
release.sh Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/bash
# This script is used to create releases for this plugin. This is mostly a helper script for the maintainer.
echo "Enter the new version number (e.g. 1.2.1):"
read version
echo "Enter the Windows x64 release ZIP URL:"
read windowsZIPURL
echo "Enter the Linux x64 release ZIP URL:"
read linuxZIPURL
echo "Enter the MacOS universal release ZIP URL:"
read macZIPURL
# wget-ing the github.com URL gives a 404, so we use the method proposed here - https://github.com/actions/upload-artifact/issues/51#issuecomment-735989475
windowsZIPURL=${windowsZIPURL/github.com/nightly.link}
linuxZIPURL=${linuxZIPURL/github.com/nightly.link}
macZIPURL=${macZIPURL/github.com/nightly.link}
wget -O windows.zip $windowsZIPURL
wget -O linux.zip $linuxZIPURL
wget -O mac.zip $macZIPURL
unzip windows.zip -d windows/
unzip linux.zip -d linux/
unzip mac.zip -d mac/
releasePath=godot-git-plugin-v$version
mkdir $releasePath
cp -r windows/addons/ $releasePath
addonsPath=$releasePath/addons
pluginPath=$addonsPath/godot-git-plugin
mkdir $pluginPath/linux
mkdir $pluginPath/osx
cp -r linux/addons/godot-git-plugin/linux/ $pluginPath/
cp -r mac/addons/godot-git-plugin/osx/ $pluginPath/
sed -i "s/version=\"[^\"]*\"/version=\"v${version}\"/g" $pluginPath/plugin.cfg
cp LICENSE $pluginPath/LICENSE
cp THIRDPARTY.md $pluginPath/THIRDPARTY.md
zip -r $releasePath.zip $addonsPath
rm -rf $releasePath
rm -rf windows
rm -rf linux
rm -rf mac
rm windows.zip
rm linux.zip
rm mac.zip