-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from MangaManagerORG/develop
v1.0.2 Merge from develop
- Loading branch information
Showing
101 changed files
with
5,968 additions
and
4,656 deletions.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,64 @@ | ||
##$repoName = "Manga-Manager" | ||
##$ownerName = "MangaManagerOrg" | ||
### Get the latest release | ||
##$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/$ownerName/$repoName/releases/latest" | ||
### Get the branch or tag name of the commit where the latest release is tied to | ||
##$latestReleaseBranchOrTagName = $latestRelease.target_commitish | ||
### Get the short hash of the commit where the latest release is tied to | ||
##$latestReleaseCommitHash = git rev-parse --short $latestReleaseBranchOrTagName | ||
### Get the short hash of the latest commit in the develop branch | ||
##$latestDevelopHash = git rev-parse --short develop | ||
## | ||
##$content = Get-Content .\MangaManager\src\__version__.py | ||
##if ($content -match '(?<=__version__ = ")[^:"]+') { | ||
## $newContent = $content -replace '__version__ = ".*"', "__version__ = `"$versionNumber:nightly--$latestReleaseCommitHash->$latestDevelopHash`"" | ||
## $newContent | Set-Content .\MangaManager\src\__version__.py | ||
##} | ||
##Write-Output $newContent | ||
#$repoName = "Manga-Manager" | ||
#$ownerName = "MangaManagerOrg" | ||
## Get the latest release | ||
#$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/$ownerName/$repoName/releases/latest" | ||
## Get the branch or tag name of the commit where the latest release is tied to | ||
#$latestReleaseBranchOrTagName = $latestRelease.target_commitish | ||
## Get the short hash of the commit where the latest release is tied to | ||
#$latestReleaseCommitHash = git rev-parse --short $latestReleaseBranchOrTagName | ||
## Get the short hash of the latest commit in the develop branch | ||
#$latestDevelopHash = git rev-parse --short develop | ||
# | ||
#$content = Get-Content .\MangaManager\src\__version__.py | ||
#$versionRegex = '(?<=__version__ = ")[^:"]+' | ||
#if ($content -match $versionRegex) { | ||
# $versionNumber = $matches[0] | ||
# $newContent = $content -replace '__version__ = ".*"', "__version__ = `"$versionNumber:nightly--$latestReleaseCommitHash->$latestDevelopHash`"" | ||
# $newContent | Set-Content .\MangaManager\src\__version__.py | ||
#} | ||
#Write-Output $newContent | ||
$repoName = "Manga-Manager" | ||
$ownerName = "MangaManagerOrg" | ||
# Get the latest release | ||
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/$ownerName/$repoName/releases/latest" | ||
# Get the branch or tag name of the commit where the latest release is tied to | ||
$latestReleaseBranchOrTagName = $latestRelease.target_commitish | ||
# Get the short hash of the commit where the latest release is tied to | ||
$latestReleaseCommitHash = git rev-parse --short $latestReleaseBranchOrTagName | ||
# Get the short hash of the latest commit in the develop branch | ||
$latestDevelopHash = git rev-parse --short develop | ||
|
||
$content = Get-Content .\MangaManager\src\__version__.py | ||
$versionFile = ".\MangaManager\src\__version__.py" | ||
|
||
# Read the current contents of the version file | ||
$content = Get-Content $versionFile | ||
|
||
# Update the commit hashes in the version file | ||
$content | ForEach-Object { | ||
if ($_ -match "^__version__ = '.*:stable$'") { | ||
$_ -replace "(?<=[^-])-?[0-9a-f]{7,}?(?=-|->)", $latestReleaseCommitHash | ||
} elseif ($_ -match "^__version__ = '.*:nightly$'") { | ||
$_ -replace "(?<=[^-])-?[0-9a-f]{7,}?(?=-|->)", $latestDevelopHash | ||
} else { | ||
$_ | ||
} | ||
} | Set-Content $versionFile | ||
Write-Output $content |
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,14 @@ | ||
|
||
## Versioning and building | ||
When a build is to be made, copy the short hash of last commit and update it in `src/__version__.py`. After that make commit and push the version bump. | ||
|
||
After that you can now create the build with the command below | ||
|
||
## How to build: | ||
`python -m PyInstaller .\MangaManager.spec --clean` | ||
|
||
## Errors building with pyinstaller | ||
If you can not run the build make sure all requirements are installed. | ||
Pyinstaller does not use the virtual env requirements. So make sure the base python has them installed | ||
Some of the requirements that gave me issues are: | ||
- `chardet` |
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
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
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
Oops, something went wrong.