Skip to content

Commit e1a72d0

Browse files
authored
v7.9
1 parent 795fe62 commit e1a72d0

File tree

11 files changed

+59
-85
lines changed

11 files changed

+59
-85
lines changed

.github/workflows/on-release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
pypi:
4040
needs: test-enviroment-variabiles
4141
runs-on: ubuntu-latest
42+
environment:
43+
name: Pypi
44+
url: https://pypi.org/project/createstructure/
4245

4346
steps:
4447
- uses: actions/checkout@v2
@@ -81,6 +84,7 @@ jobs:
8184
create-and-update-deb:
8285
needs: pypi-install-test
8386
runs-on: ubuntu-latest
87+
8488
steps:
8589
- uses: actions/checkout@v2
8690
- name: Install dependencies
@@ -121,9 +125,13 @@ jobs:
121125
asset_name: ${{ steps.envirorment-variables.outputs.DEB_FILE }}
122126
asset_content_type: application/zip
123127

124-
build-for-ppa:
128+
ppa:
125129
needs: pypi-install-test
126130
runs-on: ubuntu-latest
131+
environment:
132+
name: ppa
133+
url: https://launchpad.net/~castellanidavide/+archive/ubuntu/createstructure
134+
127135
steps:
128136
- uses: actions/checkout@v2
129137
- name: Install dependencies
@@ -214,6 +222,10 @@ jobs:
214222
publish-choco:
215223
needs: test-choco
216224
runs-on: windows-latest
225+
environment:
226+
name: choco
227+
url: https://community.chocolatey.org/packages/createstructure
228+
217229
steps:
218230
- uses: actions/checkout@v2
219231
- uses: actions/setup-python@v2

choco/ReadMe.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# createstructure
2-
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.8-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
2+
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.9-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
33

44
![](https://github.com/CastellaniDavide/createstructure/raw/master/docs/createstructure.png)
55

@@ -206,6 +206,11 @@ With this program, you can easily create a repository on GitHub :octocat: with a
206206
- [2.0_2020-03-24](#20_2020-03-24)
207207
- [1.0_2020-03-24](#10_2020-03-24)
208208

209+
#### 7.9_2021-04-04
210+
- Fixed a bug in the python code
211+
- Optimized choco package
212+
- Added envirorments for GitHub Action on every release
213+
209214
#### 7.8_2021-03-13
210215
- Fixed a bug
211216

choco/createstructure.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
33
<metadata>
44
<id>createstructure</id>
5-
<version>7.8</version>
5+
<version>7.9</version>
66
<title>createstructure</title>
77
<authors>Castellani Davide</authors>
88
<projectUrl>https://github.com/createstructure/createstructure</projectUrl>

choco/tools/chocolateyinstall.ps1

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
$ErrorActionPreference = 'Stop'; # stop on all errors
1+
# Variabiles
22
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
3-
$fileLocation = Join-Path $toolsDir 'createstructure-setup.exe'
4-
5-
$packageArgs = @{
6-
packageName = $env:ChocolateyPackageName
7-
unzipLocation = $toolsDir
8-
fileType = 'EXE'
9-
file = $fileLocation
10-
11-
softwareName = 'createstructure*'
12-
validExitCodes= @(0, 3010, 1641)
13-
silentArgs = 'install'
14-
}
15-
Install-ChocolateyInstallPackage @packageArgs
16-
17-
18-
19-
# Additional instructions
20-
21-
# My personal variabiles
223
$ppath = "C:\Progra~1\createstructure"
234
$exepath = "$ppath\createstructure.exe"
245
echo "My personal path is: $ppath"
Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,5 @@
1-
$ErrorActionPreference = 'Stop'; # stop on all errors
1+
# Variabiles
22
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
3-
$fileLocation = Join-Path $toolsDir 'createstructure-setup.exe'
4-
5-
$packageArgs = @{
6-
packageName = $env:ChocolateyPackageName
7-
fileType = 'EXE'
8-
file = $fileLocation
9-
10-
softwareName = 'createstructure*'
11-
validExitCodes= @(0, 3010, 1605, 1614, 1641)
12-
silentArgs = 'uninstall'
13-
}
14-
15-
$uninstalled = $false
16-
[array]$key = Get-UninstallRegistryKey -SoftwareName $packageArgs['softwareName']
17-
18-
if ($key.Count -eq 1) {
19-
$key | % {
20-
$packageArgs['file'] = "$($_.UninstallString)" #NOTE: You may need to split this if it contains spaces, see below
21-
Uninstall-ChocolateyPackage @packageArgs
22-
}
23-
} elseif ($key.Count -eq 0) {
24-
Write-Warning "$packageName has already been uninstalled by other means."
25-
} elseif ($key.Count -gt 1) {
26-
Write-Warning "$($key.Count) matches found!"
27-
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
28-
Write-Warning "Please alert package maintainer the following keys were matched:"
29-
$key | % {
30-
Write-Warning "- $($_.DisplayName)"
31-
}
32-
}
33-
34-
35-
36-
# Additional instructions
37-
38-
# My personal variabiles
393
$ppath = "C:\Progra~1\createstructure"
404
$exepath = "$ppath\createstructure.exe"
415
echo "My personal path is: $ppath"
@@ -51,4 +15,4 @@ if ($new_path -like "*$ppath*")
5115
echo "Delate unwanted path"
5216
$new_path = $new_path.Replace("$ppath", "").Replace(";;", ";")
5317
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $new_path
54-
}
18+
}

choco/tools/createstructure-setup.c

Lines changed: 0 additions & 5 deletions
This file was deleted.
-28.3 KB
Binary file not shown.

createstructure/__init__.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from sys import argv
1515

1616
__author__ = "help@castellanidavide.it"
17-
__version__ = "7.1 2021-02-13"
17+
__version__ = "7.9 2021-04-04"
1818

1919
class createstructure:
2020
def __init__ (self, token=None, souces=['CastellaniDavide'], organization_name="", IGNORE=[], verbose=False, template=False, answers=None):
@@ -201,23 +201,27 @@ def create_repo(self):
201201
def choose_template(self):
202202
"""This helps to find the correct template
203203
"""
204-
# Add -template if not exists
205-
if not self.ANSWERS['template'].endswith("-template"):
206-
self.ANSWERS['template'] += "-template"
207204

208-
if "/" in self.ANSWERS['template']: # If it's yours
209-
try:
210-
self.template_name = self.g.get_repo(f"{self.ANSWERS['template']}").full_name
211-
assert(self.g.get_repo(self.template_name).private == True)
212-
except:
213-
print(f"{self.get_emoji('i')}{self.ANSWERS['template']} not founded, now I want to use the default repo")
214-
self.template_name = "createstructure/default-template"
215-
else: # If you want to use the template into createstructure Organization
216-
try:
217-
self.template_name = self.g.get_repo(f"createstructure/{self.ANSWERS['template']}").full_name
218-
except:
219-
print(f"{self.get_emoji('i')}{self.ANSWERS['template']} not founded, now I want to use the default repo")
220-
self.template_name = "createstructure/default-template"
205+
if self.ANSWERS['template'] == "":
206+
self.template_name = "createstructure/default-template"
207+
else:
208+
# Add -template if not exists
209+
if not self.ANSWERS['template'].endswith("-template"):
210+
self.ANSWERS['template'] += "-template"
211+
212+
if "/" in self.ANSWERS['template']: # If it's yours
213+
try:
214+
self.template_name = self.g.get_repo(f"{self.ANSWERS['template']}").full_name
215+
assert(self.g.get_repo(self.template_name).private == True)
216+
except:
217+
print(f"{self.get_emoji('i')}{self.ANSWERS['template']} not founded, now I want to use the default repo")
218+
self.template_name = "createstructure/default-template"
219+
else: # If you want to use the template into createstructure Organization
220+
try:
221+
self.template_name = self.g.get_repo(f"createstructure/{self.ANSWERS['template']}").full_name
222+
except:
223+
print(f"{self.get_emoji('i')}{self.ANSWERS['template']} not founded, now I want to use the default repo")
224+
self.template_name = "createstructure/default-template"
221225

222226
self.template = self.g.get_repo(self.template_name)
223227
print(f"{self.get_emoji('ok')}Template founded ({self.template_name})")

debian/debian/changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
createstructure (7.9) focal; urgency=medium
2+
3+
* Fixed a bug in the python code
4+
* Optimized choco package
5+
* Added envirorments for GitHub Action on every release
6+
7+
-- Castellani Davide <help@castellanidavide.it> Sun, 04 Apr 2021 9:40:00 +1000
8+
19
createstructure (7.8) focal; urgency=medium
210

311
* Fixed a bug

docs/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# createstructure
2-
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.8-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
2+
[![GitHub license](https://img.shields.io/badge/license-GNU-green?style=flat)](https://github.com/createstructure/createstructure/blob/master/LICENSE) ![Author](https://img.shields.io/badge/author-Castellani%20Davide-green?style=flat) ![Version](https://img.shields.io/badge/version-v7.9-blue?style=flat) ![Language Python](https://img.shields.io/badge/language-Python-yellowgreen?style=flat) ![sys.platform supported](https://img.shields.io/badge/OS%20platform%20supported-Linux,%20Windows%20&%20Mac%20OS-blue?style=flat) [![On GitHub](https://img.shields.io/badge/on%20GitHub-True-green?style=flat&logo=github)](https://github.com/createstructure/createstructure) ![PyPI](https://img.shields.io/pypi/v/createstructure)
33

44
![](https://github.com/CastellaniDavide/createstructure/raw/master/docs/createstructure.png)
55

@@ -206,6 +206,11 @@ With this program, you can easily create a repository on GitHub :octocat: with a
206206
- [2.0_2020-03-24](#20_2020-03-24)
207207
- [1.0_2020-03-24](#10_2020-03-24)
208208

209+
#### 7.9_2021-04-04
210+
- Fixed a bug in the python code
211+
- Optimized choco package
212+
- Added envirorments for GitHub Action on every release
213+
209214
#### 7.8_2021-03-13
210215
- Fixed a bug
211216

0 commit comments

Comments
 (0)