Skip to content

Commit

Permalink
Remove sha from manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Mar 20, 2024
1 parent bb9f97a commit 3b4a3cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build_esptool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ jobs:
- name: Update package.json when a release tag is set
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
run: |
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
rm package.json
python ci/gen_pio_manifest.py -o "./" -s ${{ github.ref_name }} -c $SHA
python ci/gen_pio_manifest.py -o "./" -s ${{ github.ref_name }}
- name: Upload stubs artifact
if: matrix.os == 'ubuntu-latest'
uses: jason2866/[email protected]
Expand Down Expand Up @@ -142,10 +140,8 @@ jobs:
run: |
echo "Packaging new esptool release: ${{ github.ref_name }}"
python ci/patch_release.py --version ${{ github.ref_name }} esptool/__init__.py
COMMIT_SHA_LONG=$(git rev-parse --short HEAD || echo "")
SHA=${COMMIT_SHA_LONG::7}
rm package.json
python ci/gen_pio_manifest.py -o "./" -s ${{ github.ref_name }} -c $SHA
python ci/gen_pio_manifest.py -o "./" -s ${{ github.ref_name }}
python ci/pack_python.py
- name: Download built binaries
uses: actions/download-artifact@master
Expand All @@ -158,7 +154,7 @@ jobs:
- name: Release
uses: jason2866/[email protected]
with:
prerelease: true
prerelease: false
files: |
*.zip
env:
Expand Down
17 changes: 5 additions & 12 deletions ci/gen_pio_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

MANIFEST_DATA = {
"name": "tool-esptoolpy",
"description": "Serial bootloader utility for the Espressif ESP82xx, ESP32x series of SoCs",
"description": "A serial utility to communicate & flash code to Espressif chips",
"keywords": ["tools", "uploader", "tasmota", "espressif", "esp8266", "esp32"],
"license": "GPL-2.0-or-later",
"repository": {
Expand Down Expand Up @@ -41,7 +41,7 @@ def convert_version(version_string):
return ".".join((major, minor, patch))


def main(dst_dir, version_string, commit_hash):
def main(dst_dir, version_string):

converted_version = convert_version(version_string)
if not converted_version:
Expand All @@ -51,7 +51,7 @@ def main(dst_dir, version_string, commit_hash):
manifest_file_path = os.path.join(dst_dir, "package.json")
build_date = datetime.date.today()
with open(manifest_file_path, "w", encoding="utf8") as fp:
MANIFEST_DATA["version"] = f"{converted_version}+sha.{commit_hash}"
MANIFEST_DATA["version"] = f"{converted_version}"
MANIFEST_DATA["date"] = f"{build_date}"
json.dump(MANIFEST_DATA, fp, indent=2)

Expand All @@ -75,15 +75,8 @@ def main(dst_dir, version_string, commit_hash):
"--version-string",
dest="version_string",
required=True,
help="Version string in format v.*.*.*",
)
parser.add_argument(
"-c",
"--commit-hash",
dest="commit_hash",
required=True,
help="Esptool commit hash",
help="Version string in format v*.*.*",
)
args = parser.parse_args()

sys.exit(main(args.dst_dir, args.version_string, args.commit_hash))
sys.exit(main(args.dst_dir, args.version_string))
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tool-esptoolpy",
"description": "Serial bootloader utility for the Espressif ESP82xx, ESP32x series of SoCs",
"description": "A serial utility to communicate & flash code to Espressif chips",
"keywords": [
"tools",
"uploader",
Expand All @@ -14,6 +14,6 @@
"type": "git",
"url": "https://github.com/tasmota/esptool"
},
"version": "4.7.2+sha.90805db",
"date": "2024-03-18"
"version": "4.7.2",
"date": "2024-03-20"
}

0 comments on commit 3b4a3cf

Please sign in to comment.